diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..8f79e01
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,367 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/junit-4.11.pom b/junit-4.11.pom
deleted file mode 100644
index 97cdd12..0000000
--- a/junit-4.11.pom
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
- 4.0.0
- junit
- junit
- 4.11
- JUnit
- http://junit.org
-
- JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
- It is used by the developer who implements unit tests in Java.
-
-
- JUnit
- http://www.junit.org
-
-
-
- JUnit Mailing List
- junit@yahoogroups.com
-
- http://tech.groups.yahoo.com/group/junit/
-
-
-
-
-
- Common Public License Version 1.0
- http://www.opensource.org/licenses/cpl1.0.txt
-
-
-
- scm:git:git://github.com/KentBeck/junit.git
- scm:git:git@github.com:KentBeck/junit.git
- http://github.com/KentBeck/junit/tree/master
-
-
-
- dsaff
- David Saff
- david@saff.net
-
-
-
-
-
- maven-compiler-plugin
-
- ISO-8859-1
-
- ${jdk.version}
-
-
-
-
-
-
- org.hamcrest
- hamcrest-core
- 1.3
- compile
-
-
-
- 1.5
-
-
\ No newline at end of file
diff --git a/junit-jdk8.patch b/junit-jdk8.patch
deleted file mode 100644
index a44b70d..0000000
--- a/junit-jdk8.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Index: junit-r4.11/src/main/java/org/junit/runners/model/FrameworkMethod.java
-===================================================================
---- junit-r4.11.orig/src/main/java/org/junit/runners/model/FrameworkMethod.java
-+++ junit-r4.11/src/main/java/org/junit/runners/model/FrameworkMethod.java
-@@ -83,14 +83,11 @@ public class FrameworkMethod extends Fra
- *
is not static (given {@code isStatic is true}).
- */
- public void validatePublicVoid(boolean isStatic, List errors) {
-- if (Modifier.isStatic(fMethod.getModifiers()) != isStatic) {
-+ if (isStatic() != isStatic) {
- String state = isStatic ? "should" : "should not";
- errors.add(new Exception("Method " + fMethod.getName() + "() " + state + " be static"));
- }
-- if (!Modifier.isPublic(fMethod.getDeclaringClass().getModifiers())) {
-- errors.add(new Exception("Class " + fMethod.getDeclaringClass().getName() + " should be public"));
-- }
-- if (!Modifier.isPublic(fMethod.getModifiers())) {
-+ if (!isPublic()) {
- errors.add(new Exception("Method " + fMethod.getName() + "() should be public"));
- }
- if (fMethod.getReturnType() != Void.TYPE) {
-Index: junit-r4.11/src/test/java/org/junit/tests/AllTests.java
-===================================================================
---- junit-r4.11.orig/src/test/java/org/junit/tests/AllTests.java
-+++ junit-r4.11/src/test/java/org/junit/tests/AllTests.java
-@@ -77,7 +77,6 @@ import org.junit.tests.running.methods.T
- import org.junit.tests.running.methods.TimeoutTest;
- import org.junit.tests.validation.BadlyFormedClassesTest;
- import org.junit.tests.validation.FailedConstructionTest;
--import org.junit.tests.validation.InaccessibleBaseClassTest;
- import org.junit.tests.validation.ValidationTest;
-
- // These test files need to be cleaned. See
-@@ -118,7 +117,6 @@ import org.junit.tests.validation.Valida
- JUnit38ClassRunnerTest.class,
- SystemExitTest.class,
- JUnitCoreReturnsCorrectExitCodeTest.class,
-- InaccessibleBaseClassTest.class,
- SuiteMethodTest.class,
- BadlyFormedClassesTest.class,
- IgnoreClassTest.class,
diff --git a/junit-jdk9.patch b/junit-jdk9.patch
deleted file mode 100644
index 12481c4..0000000
--- a/junit-jdk9.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- junit-r4.11/build.xml 2012-11-13 21:10:09.000000000 +0100
-+++ junit-r4.11/build.xml 2017-09-08 10:38:22.639250431 +0200
-@@ -71,8 +71,8 @@
- debug="on"
- classpath="@{classpath}"
- includeantruntime="false"
-- source="1.5"
-- target="1.5"
-+ source="1.6"
-+ target="1.6"
- >
-
-
diff --git a/junit-no-hamcrest-src.patch b/junit-no-hamcrest-src.patch
deleted file mode 100644
index ef6fda1..0000000
--- a/junit-no-hamcrest-src.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 0efaf87..2efa11c 100644
---- a/build.xml
-+++ b/build.xml
-@@ -30,7 +30,6 @@
-
-
-
--
-
-
-
-@@ -125,10 +124,6 @@
-
-
-
--
--
--
--
-
-
-
-@@ -138,7 +133,7 @@
-
-
-
--
-+
-
-
-
--
-
-
-
diff --git a/junit.changes b/junit.changes
index 133857c..b50e59d 100644
--- a/junit.changes
+++ b/junit.changes
@@ -1,3 +1,18 @@
+-------------------------------------------------------------------
+Mon Jan 21 23:36:15 UTC 2019 - Jan Engelhardt
+
+- Trim repeated metadata from description.
+
+-------------------------------------------------------------------
+Wed Dec 26 06:27:56 UTC 2018 - Fridrich Strba
+
+- Upgrade to 4.12
+- Removed patches:
+ * junit-jdk8.patch
+ * junit-jdk9.patch
+ * junit-no-hamcrest-src.patch
+ + Integrated directly in the added build.xml file
+
-------------------------------------------------------------------
Wed Jul 11 14:52:48 UTC 2018 - fstrba@suse.com
diff --git a/junit.spec b/junit.spec
index ed17e37..02e1008 100644
--- a/junit.spec
+++ b/junit.spec
@@ -1,7 +1,7 @@
#
# spec file for package junit
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,36 +12,29 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: junit
-Version: 4.11
+Version: 4.12
Release: 0
Summary: Java regression test package
License: CPL-1.0
Group: Development/Libraries/Java
Url: http://www.junit.org/
Source0: https://github.com/junit-team/junit/archive/r%{version}.tar.gz
-#Source1: http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.pom
-Source1: junit-4.11.pom
-#PATCH-FIX-OPENSUSE: do not use bundled hamcrest sources, which btw fixes hamcrest build with junit4
-Patch0: junit-no-hamcrest-src.patch
-#PATCH-FIX-UPSTREAM: build with jdk8 and newer, already in upstream repo
-Patch1: junit-jdk8.patch
-Patch2: junit-jdk9.patch
-Patch3: junit-jdk10.patch
-Patch4: junit-jdk11.patch
+Source1: build.xml
+Patch0: junit-jdk10.patch
+Patch1: junit-jdk11.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: hamcrest >= 1.3
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-local
-BuildRequires: javapackages-tools
BuildRequires: perl(Digest::MD5)
Requires: hamcrest
-Requires: java >= 1.6.0
+Requires: java >= 1.6
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
Provides: junit4 = %{version}
@@ -50,45 +43,30 @@ BuildArch: noarch
%description
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
-It is used by the developer who implements unit tests in Java. JUnit is Open
-Source Software, released under the Common Public License Version 1.0 and
-hosted on GitHub.
-
-%package manual
-Summary: Manual for %{name}
-Group: Documentation/Other
-Provides: junit4-manual = %{version}
-Obsoletes: junit4-manual <= 4.10
-
-%description manual
-Manual for %{name}.
+It is used by the developer who implements unit tests in Java.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
Provides: junit4-javadoc = %{version}
Obsoletes: junit4-javadoc <= 4.10
+Provides: junit4-manual = %{version}
+Obsoletes: junit4-manual <= 4.10
+Provides: junit4-demo = %{version}
+Obsoletes: junit4-demo <= 4.10
+Provides: %{name}-manual = %{version}
+Obsoletes: %{name}-manual < %{version}
+Provides: %{name}-demo = %{version}
+Obsoletes: %{name}-demo < %{version}
%description javadoc
Javadoc for %{name}.
-%package demo
-Summary: Demos for %{name}
-Group: Documentation/Other
-Requires: %{name} = %{version}
-Provides: junit4-demo = %{version}
-Obsoletes: junit4-demo <= 4.10
-
-%description demo
-Demos for %{name}.
-
%prep
-%setup -q -n junit-r%{version}
+%setup -q -n junit4-r%{version}
+cp %{SOURCE1} .
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
find . -type f -name "*.jar" -or -name "*.class" | xargs -t rm -rf
@@ -96,7 +74,7 @@ ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.3.jar
%build
export CLASSPATH=$(build-classpath hamcrest/core)
-ant dist -Dversion-status=
+ant jars javadoc -Dversion-status=
%install
# jars
@@ -107,7 +85,7 @@ ln -sf %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/junit4.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
@@ -115,11 +93,6 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr junit%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
-# demo
-install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo/junit # Not using % name for last part because it is
- # part of package name
-cp -pr junit%{version}/junit/* %{buildroot}%{_datadir}/%{name}/demo/junit
-
%check
cat > test.java <&1 | \
grep 'Exception in thread "main" java.lang.AssertionError: Hello world from junit'
%files
-%doc CODING_STYLE LICENSE README acknowledgements.txt
+%doc CODING_STYLE.txt LICENSE-junit.txt README.md acknowledgements.txt
%{_javadir}/%{name}.jar
%{_javadir}/junit4.jar
%{_mavenpomdir}/*
+%if %{defined _maven_repository}
+%{_mavendepmapfragdir}/%{name}
+%else
%{_datadir}/maven-metadata/%{name}.xml*
-
-%files demo
-%{_datadir}/%{name}
+%endif
%files javadoc
%{_javadocdir}/%{name}
-%files manual
-%doc junit%{version}/doc/*
-
%changelog
diff --git a/r4.11.tar.gz b/r4.11.tar.gz
deleted file mode 100644
index 2606da5..0000000
--- a/r4.11.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7f427e18a21006ea5394fb71b268d2fa1d12a9f4575b5743ff093547c7ac7b37
-size 1974196
diff --git a/r4.12.tar.gz b/r4.12.tar.gz
new file mode 100644
index 0000000..a5b7f87
--- /dev/null
+++ b/r4.12.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9a5b458258c6537df0d2df7122a06895a26b9c7c8061e5991a0be81d76b10d24
+size 443804