From 637a374511e1a311f68981e1fbb644e7ffa7607d Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 19 Jan 2015 07:52:35 +0100 Subject: [PATCH] Update to upstream version 4.12 --- .gitignore | 1 + junit-OSGi-MANIFEST.MF | 33 ----------- junit-no-hamcrest-src.patch | 40 -------------- junit.spec | 106 +++++++++++++++--------------------- sources | 2 +- 5 files changed, 46 insertions(+), 136 deletions(-) delete mode 100644 junit-OSGi-MANIFEST.MF delete mode 100644 junit-no-hamcrest-src.patch diff --git a/.gitignore b/.gitignore index f59ecd6..ecd44ef 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ junit3.8.2.zip /junit-4.10.tar.xz /r4.11.tar.gz /junit-4.11-clean.tar.gz +/junit-4.12-clean.tar.gz diff --git a/junit-OSGi-MANIFEST.MF b/junit-OSGi-MANIFEST.MF deleted file mode 100644 index 19d299e..0000000 --- a/junit-OSGi-MANIFEST.MF +++ /dev/null @@ -1,33 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ClassPath: . -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.junit -Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too - ls:org.eclipse.orbit/org.junit;tag=v201303080030 -Require-Bundle: org.hamcrest.core;bundle-version="1.3.0";visibility:=r - eexport -Export-Package: junit.extensions;version="4.11.0",junit.framework;vers - ion="4.11.0",junit.runner;version="4.11.0",junit.textui;version="4.11 - .0",org.junit;version="4.11.0",org.junit.experimental;version="4.11.0 - ",org.junit.experimental.categories;version="4.11.0",org.junit.experi - mental.max;version="4.11.0",org.junit.experimental.results;version="4 - .11.0",org.junit.experimental.runners;version="4.11.0",org.junit.expe - rimental.theories;version="4.11.0",org.junit.experimental.theories.in - ternal;version="4.11.0";x-internal:=true,org.junit.experimental.theor - ies.suppliers;version="4.11.0",org.junit.internal;version="4.11.0";x- - internal:=true,org.junit.internal.builders;version="4.11.0";x-interna - l:=true,org.junit.internal.matchers;version="4.11.0";x-internal:=true - ,org.junit.internal.requests;version="4.11.0";x-internal:=true,org.ju - nit.internal.runners;version="4.11.0";x-internal:=true,org.junit.inte - rnal.runners.model;version="4.11.0";x-internal:=true,org.junit.intern - al.runners.rules;version="4.11.0";x-internal:=true,org.junit.internal - .runners.statements;version="4.11.0";x-internal:=true,org.junit.match - ers;version="4.11.0",org.junit.rules;version="4.11.0",org.junit.runne - r;version="4.11.0",org.junit.runner.manipulation;version="4.11.0",org - .junit.runner.notification;version="4.11.0",org.junit.runners;version - ="4.11.0",org.junit.runners.model;version="4.11.0" -Bundle-Version: 4.11.0.v201303080030 -Bundle-ManifestVersion: 2 diff --git a/junit-no-hamcrest-src.patch b/junit-no-hamcrest-src.patch deleted file mode 100644 index 105ce60..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.spec b/junit.spec index 5230017..deed2d3 100644 --- a/junit.spec +++ b/junit.spec @@ -1,28 +1,21 @@ Name: junit Epoch: 1 -Version: 4.11 -Release: 14%{?dist} +Version: 4.12 +Release: 1%{?dist} Summary: Java regression test package -License: CPL +License: EPL URL: http://www.junit.org/ BuildArch: noarch # ./clean-tarball.sh %{version} Source0: %{name}-%{version}-clean.tar.gz -Source2: junit-OSGi-MANIFEST.MF Source3: create-tarball.sh -# Removing hamcrest source jar references (not available and/or necessary) -Patch0: %{name}-no-hamcrest-src.patch - -BuildRequires: ant -BuildRequires: ant-contrib -BuildRequires: java-devel +BuildRequires: maven-local BuildRequires: hamcrest -BuildRequires: perl(Digest::MD5) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -Requires: hamcrest -Requires: java-headless +Obsoletes: %{name}-demo < 4.12 %description JUnit is a regression testing framework written by Erich Gamma and Kent Beck. @@ -42,71 +35,60 @@ Summary: Javadoc for %{name} %description javadoc Javadoc for %{name}. -%package demo -Summary: Demos for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description demo -Demonstrations and samples for %{name}. - %prep %setup -q -n %{name}-r%{version} -%patch0 -p1 - -cp build/maven/junit-pom-template.xml pom.xml -# fix placeholder version in pom -%pom_xpath_set pom:project/pom:version "%{version}" - -ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.3.jar # InaccessibleBaseClassTest fails with Java 8 sed -i /InaccessibleBaseClassTest/d src/test/java/org/junit/tests/AllTests.java -%build -ant dist -Dversion-status= +%pom_remove_plugin :replacer +sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >src/main/java/junit/runner/Version.java -# inject OSGi manifest -mkdir -p META-INF -cp -p %{SOURCE2} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip -u %{name}%{version}/%{name}-%{version}.jar META-INF/MANIFEST.MF +%pom_remove_plugin :animal-sniffer-maven-plugin + +# Removing hamcrest source jar references (not available and/or necessary) +%pom_remove_plugin :maven-javadoc-plugin + +# Add proper Apache Felix Bundle Plugin instructions +# so that we get a reasonable OSGi manifest. +%pom_xpath_inject pom:project "bundle" +%pom_xpath_inject pom:build/pom:plugins " + + org.apache.felix + maven-bundle-plugin + true + + + org.junit + <_nouses>true + + + " + +%mvn_file : %{name} + +%build +%mvn_build %install -# jars -install -d -m 755 %{buildroot}%{_javadir} -install -m 644 %{name}%{version}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar - -# pom -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap - -# javadoc -install -d -m 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr %{name}%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name} - -# demo -install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo/%{name} - -cp -pr %{name}%{version}/%{name}/* %{buildroot}%{_datadir}/%{name}/demo/%{name} - +%mvn_install %files -f .mfiles -%doc LICENSE README CODING_STYLE +%doc LICENSE-junit.txt README.md -%files demo -%doc LICENSE -%{_datadir}/%{name} - -%files javadoc -%doc LICENSE -%doc %{_javadocdir}/%{name} +%files javadoc -f .mfiles-javadoc +%doc LICENSE-junit.txt %files manual -%doc LICENSE README CODING_STYLE -%doc junit%{version}/doc/* +%doc LICENSE-junit.txt +%doc doc/* %changelog +* Mon Jan 19 2015 Mikolaj Izdebski - 1:4.12-1 +- Update to upstream version 4.12 +- Build with Maven +- Remove demo package + * Mon Jun 9 2014 Mikolaj Izdebski - 1:4.11-14 - Add epoch as workaround for a bug in koji-shadow diff --git a/sources b/sources index 6be7e5d..d77668d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5f33e6ebaba68f3523c664f5a3860a7 junit-4.11-clean.tar.gz +0de14594aaba3379f6b19ba75a393232 junit-4.12-clean.tar.gz