diff --git a/.gitignore b/.gitignore index e69de29..fb28667 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/commons-collections-3.2.2-src.tar.gz diff --git a/java8-compat.patch b/0001-Port-to-Java-8.patch similarity index 88% rename from java8-compat.patch rename to 0001-Port-to-Java-8.patch index 9d2e92a..25f40f7 100644 --- a/java8-compat.patch +++ b/0001-Port-to-Java-8.patch @@ -1,5 +1,19 @@ +From 066f654cd6a1b9d3bfd54565af1d618dada2deb4 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 17 Nov 2015 01:02:55 +0100 +Subject: [PATCH] Port to Java 8 + +--- + src/java/org/apache/commons/collections/MultiHashMap.java | 8 ++++---- + src/java/org/apache/commons/collections/MultiMap.java | 4 ++-- + src/java/org/apache/commons/collections/map/MultiKeyMap.java | 8 +++++--- + src/java/org/apache/commons/collections/map/MultiValueMap.java | 8 ++++---- + src/test/org/apache/commons/collections/TestMultiHashMap.java | 10 +++++----- + .../org/apache/commons/collections/map/TestMultiKeyMap.java | 4 ++-- + 6 files changed, 22 insertions(+), 20 deletions(-) + diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java -index 25158b4..ab0ca71 100644 +index 7fec9af..bcb4a11 100644 --- a/src/java/org/apache/commons/collections/MultiHashMap.java +++ b/src/java/org/apache/commons/collections/MultiHashMap.java @@ -331,21 +331,21 @@ public class MultiHashMap extends HashMap implements MultiMap { @@ -29,7 +43,7 @@ index 25158b4..ab0ca71 100644 /** diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java -index 8cd7212..60f22ae 100644 +index be9455b..4d9cc7d 100644 --- a/src/java/org/apache/commons/collections/MultiMap.java +++ b/src/java/org/apache/commons/collections/MultiMap.java @@ -66,7 +66,7 @@ public interface MultiMap extends Map { @@ -51,7 +65,7 @@ index 8cd7212..60f22ae 100644 /** * Gets a collection containing all the values in the map. diff --git a/src/java/org/apache/commons/collections/map/MultiKeyMap.java b/src/java/org/apache/commons/collections/map/MultiKeyMap.java -index 1ba1cea..3523b5c 100644 +index 9e3e02d..969d11e 100644 --- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java +++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java @@ -197,7 +197,7 @@ public class MultiKeyMap @@ -81,7 +95,7 @@ index 1ba1cea..3523b5c 100644 /** diff --git a/src/java/org/apache/commons/collections/map/MultiValueMap.java b/src/java/org/apache/commons/collections/map/MultiValueMap.java -index cc74fd7..b347e84 100644 +index f44999b..79938dc 100644 --- a/src/java/org/apache/commons/collections/map/MultiValueMap.java +++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java @@ -153,19 +153,19 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap { @@ -109,7 +123,7 @@ index cc74fd7..b347e84 100644 /** diff --git a/src/test/org/apache/commons/collections/TestMultiHashMap.java b/src/test/org/apache/commons/collections/TestMultiHashMap.java -index 722bec0..2268d85 100644 +index eca833a..f47c6f9 100644 --- a/src/test/org/apache/commons/collections/TestMultiHashMap.java +++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java @@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap { @@ -130,7 +144,7 @@ index 722bec0..2268d85 100644 } diff --git a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java -index 6e528fb..9faabf7 100644 +index b1ee3d0..66fcade 100644 --- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java @@ -315,10 +315,10 @@ public class TestMultiKeyMap extends AbstractTestIterableMap { @@ -146,3 +160,6 @@ index 6e528fb..9faabf7 100644 assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); break; case 3: +-- +2.5.0 + diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 501312d..ef9970d 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -2,31 +2,21 @@ %global short_name commons-%{base_name} Name: apache-%{short_name} -Version: 3.2.1 -Release: 26%{?dist} +Version: 3.2.2 +Release: 1%{?dist} Summary: Provides new interfaces, implementations and utilities for Java Collections License: ASL 2.0 -Group: Development/Libraries URL: http://commons.apache.org/%{base_name}/ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz -Source1: commons-collections-testframework.pom - -Patch0: java8-compat.patch -Patch1: jakarta-%{short_name}-javadoc-nonet.patch - -Patch4: commons-collections-3.2-build_xml.patch +Patch0: 0001-Port-to-Java-8.patch BuildArch: noarch -BuildRequires: java-devel -BuildRequires: jpackage-utils -BuildRequires: maven-local -BuildRequires: ant -BuildRequires: apache-commons-parent -BuildRequires: dos2unix -Requires: java-headless -Requires: jpackage-utils +BuildRequires: ant +BuildRequires: maven-local +BuildRequires: mvn(org.apache.commons:commons-parent:pom:) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) %description The introduction of the Collections API by Sun in JDK 1.2 has been a @@ -45,7 +35,6 @@ such as union, intersection, and closure. %package testframework Summary: Testframework for %{name} -Group: Development/Tools Requires: %{name} = %{version}-%{release} %description testframework @@ -53,99 +42,53 @@ Requires: %{name} = %{version}-%{release} %package javadoc Summary: Javadoc for %{name} -Group: Documentation +Provides: %{name}-testframework-javadoc = %{version}-%{release} +Obsoletes: %{name}-testframework-javadoc < %{version}-%{release} %description javadoc %{summary}. -%package testframework-javadoc -Summary: Javadoc for %{name}-testframework -Group: Documentation - -%description testframework-javadoc -%{summary}. - %prep %setup -q -n %{short_name}-%{version}-src # remove all binary libs find . -name "*.jar" -exec rm -f {} \; find . -name "*.class" -exec rm -f {} \; -find . -name "*.java" |xargs dos2unix %patch0 -p1 -%patch1 -p1 -%patch4 -b .sav # Fix file eof -%{__sed} -i 's/\r//' LICENSE.txt -%{__sed} -i 's/\r//' PROPOSAL.html -%{__sed} -i 's/\r//' RELEASE-NOTES.html -%{__sed} -i 's/\r//' README.txt -%{__sed} -i 's/\r//' NOTICE.txt +sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt -# Substitute version into testframework pom -cp -p %{SOURCE1} pom-testframework.xml -sed -i 's/@VERSION@/%{version}/' pom-testframework.xml +%mvn_package :%{short_name}-testframework testframework +%mvn_file ':%{short_name}{,-testframework}' %{name}@1 %{short_name}@1 %build %mvn_build -ant tf.javadoc +ant tf.javadoc -Dtf.build.docs=target/site/apidocs/ + +%mvn_artifact %{short_name}:%{short_name}-testframework:%{version} target/%{short_name}-testframework-%{version}.jar %install - -# jars -install -Dm 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar -install -Dm 644 target/%{short_name}-testframework-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-testframework.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) - - -# poms -mkdir -p %{buildroot}%{_datadir}/maven-poms/ -install -Dpm 644 pom.xml %{buildroot}%{_datadir}/maven-poms/%{short_name}.pom -install -Dpm 644 pom-testframework.xml %{buildroot}%{_datadir}/maven-poms/%{short_name}-testframework.pom - - -# fragments -%add_maven_depmap %{short_name}.pom %{short_name}.jar -a "org.apache.commons:%{short_name}" -%add_maven_depmap %{short_name}-testframework.pom %{short_name}-testframework.jar -f "testframework" -a "org.apache.commons:%{short_name}-testframework" - - -# javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} -rm -rf target/site/apidocs - - -# testframework-javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework-%{version} -cp -pr build/docs/testframework/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework-%{version} -ln -s %{name}-testframework-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework - +%mvn_install %files -f .mfiles -%doc PROPOSAL.html README.txt LICENSE.txt RELEASE-NOTES.html NOTICE.txt -%{_javadir}/%{name}.jar -%{_javadir}/%{short_name}.jar +%doc PROPOSAL.html README.txt LICENSE.txt NOTICE.txt %files testframework -f .mfiles-testframework -%{_javadir}/%{name}-testframework.jar -%{_javadir}/%{short_name}-testframework.jar -%files javadoc +%files javadoc -f .mfiles-javadoc %doc LICENSE.txt NOTICE.txt -%{_javadocdir}/%{name}-%{version} -%{_javadocdir}/%{name} - -%files testframework-javadoc -%doc LICENSE.txt NOTICE.txt -%{_javadocdir}/%{name}-testframework-%{version} -%{_javadocdir}/%{name}-testframework %changelog +* Mon Nov 16 2015 Michael Simacek - 3.2.2-1 +- Update to upstream version 3.2.2 +- Merge two javadoc subpackages +- Install with XMVn +- Specfile cleanup + * Wed Jun 17 2015 Fedora Release Engineering - 3.2.1-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/collections-tomcat5-build.xml b/collections-tomcat5-build.xml deleted file mode 100644 index 184e852..0000000 --- a/collections-tomcat5-build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/commons-collections-3.2-build_xml.patch b/commons-collections-3.2-build_xml.patch deleted file mode 100644 index c9169f1..0000000 --- a/commons-collections-3.2-build_xml.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- build.xml.orig 2008-11-29 21:16:01.000000000 +0200 -+++ build.xml 2008-11-29 21:17:28.000000000 +0200 -@@ -286,7 +286,7 @@ - - - -- -+ - - - -@@ -331,7 +331,7 @@ - - -- -+ - - - diff --git a/commons-collections-testframework.pom b/commons-collections-testframework.pom deleted file mode 100644 index aecb9cc..0000000 --- a/commons-collections-testframework.pom +++ /dev/null @@ -1,6 +0,0 @@ - - 4.0.0 - commons-collections - commons-collections-testframework - @VERSION@ - diff --git a/jakarta-commons-collections-javadoc-nonet.patch b/jakarta-commons-collections-javadoc-nonet.patch deleted file mode 100644 index 1dcb47a..0000000 --- a/jakarta-commons-collections-javadoc-nonet.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- commons-collections-3.1/build.xml~ 2004-06-23 00:17:14.000000000 +0100 -+++ commons-collections-3.1/build.xml 2005-05-04 13:58:44.000000000 +0100 -@@ -80,7 +80,6 @@ - - - -- - - - -@@ -362,7 +361,6 @@ - author="true" - version="true" - use="true" -- link="${javadoc.links}" - overview="${source.java}/org/apache/commons/collections/overview.html" - doctitle="${component.title} ${component.version} API;" - windowtitle="${component.title} ${component.version} API" -@@ -470,7 +468,6 @@ - access="protected" - author="false" - version="false" -- link="${javadoc.links}" - overview="${source.test}/org/apache/commons/collections/overview.html" - doctitle="${tf.title} ${tf.version} API;" - windowtitle="${tf.title} ${tf.version} API" diff --git a/sources b/sources index 4fe4f6f..80cc7ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -031ce05872ddb0462f0dcce1e5babbe9 commons-collections-3.2.1-src.tar.gz +776b51a51312c1854ad8f6d344a47cda commons-collections-3.2.2-src.tar.gz