commit 8eebfaf420429bee3095618a2dea35b09ab437445528964adb7f6fdf005a4dcb Author: Fridrich Strba Date: Mon Feb 25 12:41:57 2019 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-collections4?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/apache-commons-collections4.spec b/apache-commons-collections4.spec new file mode 100644 index 0000000..1d20e18 --- /dev/null +++ b/apache-commons-collections4.spec @@ -0,0 +1,92 @@ +# +# spec file for package apache-commons-collections4 +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define base_name collections4 +%define short_name commons-%{base_name} +%bcond_with tests +Name: apache-%{short_name} +Version: 4.1 +Release: 0 +Summary: Extension of the Java Collections Framework +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://commons.apache.org/proper/commons-collections/ +Source0: http://archive.apache.org/dist/commons/collections/source/commons-collections4-%{version}-src.tar.gz +Patch0: commons-collections4-4.1-jdk11.patch +Patch1: commons-collections4-4.1-bundle.patch +Patch2: commons-collections4-4.1-javadoc.patch +BuildRequires: fdupes ant +BuildRequires: javapackages-local +BuildArch: noarch +%if %{with tests} +BuildRequires: easymock ant-junit +%endif + +%description +Commons-Collections seek to build upon the JDK classes by providing +new interfaces, implementations and utilities. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation/HTML + +%description javadoc +This package provides %{summary}. + +%prep +%setup -q -n commons-collections4-%{version}-src +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%pom_remove_parent + +%build +%ant \ +%if %{with tests} + -Djunit.jar=$(build-classpath junit) \ + -Dhamcrest.jar=$(build-classpath hamcrest/core) \ + -Deasymock.jar=$(build-classpath easymock) \ + test \ +%endif + jar javadoc + +%install +# jar +install -dm 0755 %{buildroot}%{_javadir} +install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar +# pom +install -dm 0755 %{buildroot}%{_mavenpomdir} +install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom +%add_maven_depmap %{name}.pom %{name}.jar +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%doc RELEASE-NOTES.txt +%license LICENSE.txt NOTICE.txt +%{_javadir}/%{short_name}.jar + +%files javadoc +%license LICENSE.txt NOTICE.txt +%{_javadocdir}/%{name} + +%changelog diff --git a/commons-collections4-4.1-bundle.patch b/commons-collections4-4.1-bundle.patch new file mode 100644 index 0000000..4dbaf89 --- /dev/null +++ b/commons-collections4-4.1-bundle.patch @@ -0,0 +1,19 @@ +--- commons-collections4-4.1-src/build.xml 2019-02-25 13:03:20.651249023 +0100 ++++ commons-collections4-4.1-src/build.xml 2019-02-25 13:11:55.393720267 +0100 +@@ -146,6 +146,16 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/commons-collections4-4.1-javadoc.patch b/commons-collections4-4.1-javadoc.patch new file mode 100644 index 0000000..cbf8c7c --- /dev/null +++ b/commons-collections4-4.1-javadoc.patch @@ -0,0 +1,19 @@ +--- commons-collections4-4.1-src/build.xml 2015-11-25 22:52:41.000000000 +0100 ++++ commons-collections4-4.1-src/build.xml 2019-02-25 13:29:35.562798645 +0100 +@@ -29,7 +29,6 @@ + + + +- + + + +@@ -125,8 +124,6 @@ + encoding="${compile.encoding}" + source="${compile.source}"> + +- +- + + + diff --git a/commons-collections4-4.1-jdk11.patch b/commons-collections4-4.1-jdk11.patch new file mode 100644 index 0000000..74bb6ed --- /dev/null +++ b/commons-collections4-4.1-jdk11.patch @@ -0,0 +1,11 @@ +--- commons-collections4-4.1-src/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java 2015-11-25 22:52:42.000000000 +0100 ++++ commons-collections4-4.1-src/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java 2018-11-19 09:48:39.052536491 +0100 +@@ -1085,7 +1085,7 @@ + verify(); + + try { +- array = getCollection().toArray(null); ++ array = getCollection().toArray((Object[])null); + fail("toArray(null) should raise NPE"); + } catch (final NullPointerException e) { + // expected diff --git a/commons-collections4-4.1-src.tar.gz b/commons-collections4-4.1-src.tar.gz new file mode 100644 index 0000000..7f0bdc5 --- /dev/null +++ b/commons-collections4-4.1-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94839a0620a0fb1999aa94d490cd8d6919f79dc206be33b722f856ffde862ecf +size 704671