4799b2
%global base_name       collections
4799b2
%global short_name      commons-%{base_name}
4799b2
4799b2
Name:           apache-%{short_name}
4799b2
Version:        3.2.2
4799b2
Release:        8%{?dist}
4799b2
Summary:        Provides new interfaces, implementations and utilities for Java Collections
4799b2
License:        ASL 2.0
4799b2
URL:            http://commons.apache.org/%{base_name}/
4799b2
Source0:        http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
4799b2
4799b2
Patch0:         0001-Port-to-Java-8.patch
4799b2
4799b2
BuildArch:      noarch
4799b2
4799b2
BuildRequires:  ant
4799b2
BuildRequires:  maven-local
4799b2
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
4799b2
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
4799b2
4799b2
%description
4799b2
The introduction of the Collections API by Sun in JDK 1.2 has been a
4799b2
boon to quick and effective Java programming. Ready access to powerful
4799b2
data structures has accelerated development by reducing the need for
4799b2
custom container classes around each core object. Most Java2 APIs are
4799b2
significantly easier to use because of the Collections API.
4799b2
However, there are certain holes left unfilled by Sun's
4799b2
implementations, and the Jakarta-Commons Collections Component strives
4799b2
to fulfill them. Among the features of this package are:
4799b2
- special-purpose implementations of Lists and Maps for fast access
4799b2
- adapter classes from Java1-style containers (arrays, enumerations) to
4799b2
Java2-style collections.
4799b2
- methods to test or create typical set-theory properties of collections
4799b2
such as union, intersection, and closure.
4799b2
4799b2
%package testframework
4799b2
Summary:        Testframework for %{name}
4799b2
Requires:       %{name} = %{version}-%{release}
4799b2
4799b2
%description testframework
4799b2
%{summary}.
4799b2
4799b2
%package javadoc
4799b2
Summary:        Javadoc for %{name}
4799b2
Provides:       %{name}-testframework-javadoc = %{version}-%{release}
4799b2
Obsoletes:      %{name}-testframework-javadoc < %{version}-%{release}
4799b2
4799b2
%description javadoc
4799b2
%{summary}.
4799b2
4799b2
%prep
4799b2
%setup -q -n %{short_name}-%{version}-src
4799b2
4799b2
# remove all binary libs
4799b2
find . -name "*.jar" -exec rm -f {} \;
4799b2
find . -name "*.class" -exec rm -f {} \;
4799b2
4799b2
%patch0 -p1
4799b2
4799b2
# Fix file eof
4799b2
sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt
4799b2
4799b2
%mvn_package :%{short_name}-testframework testframework
4799b2
%mvn_file ':%{short_name}{,-testframework}' %{name}@1 %{short_name}@1
4799b2
4799b2
%build
4799b2
# 2017-09-18 mizdebsk: Temporarly disable tests, they stopped working
4799b2
# after Maven Surefire upgrade to 2.20, need to investigate why.
4799b2
%mvn_build -- -DskipTests
4799b2
4799b2
ant tf.javadoc -Dtf.build.docs=target/site/apidocs/
4799b2
4799b2
%mvn_artifact %{short_name}:%{short_name}-testframework:%{version} target/%{short_name}-testframework-%{version}.jar
4799b2
4799b2
%install
4799b2
%mvn_install
4799b2
4799b2
# Workaround for RPM bug #646523 - can't change symlink to directory
4799b2
%pretrans javadoc -p <lua>
4799b2
dir = "%{_javadocdir}/%{name}"
4799b2
dummy = posix.readlink(dir) and os.remove(dir)
4799b2
4799b2
4799b2
%files -f .mfiles
4799b2
%doc PROPOSAL.html README.txt
4799b2
%license LICENSE.txt NOTICE.txt
4799b2
4799b2
%files testframework -f .mfiles-testframework
4799b2
4799b2
%files javadoc -f .mfiles-javadoc
4799b2
%license LICENSE.txt NOTICE.txt
4799b2
4799b2
4799b2
%changelog
4799b2
* Tue Apr 24 2018 Mat Booth <mat.booth@redhat.com> - 3.2.2-8
4799b2
- Allow testframework to still be built even with tests disabled, which is
4799b2
  needed by other packages
4799b2
4799b2
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-7
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4799b2
4799b2
* Mon Sep 18 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-6
4799b2
- Temporarly disable running tests
4799b2
4799b2
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-5
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4799b2
4799b2
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-4
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4799b2
4799b2
* Wed Mar 23 2016 Michael Simacek <msimacek@redhat.com> - 3.2.2-3
4799b2
- Add workaround for symlink->directory rpm bug
4799b2
4799b2
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4799b2
4799b2
* Mon Nov 16 2015 Michael Simacek <msimacek@redhat.com> - 3.2.2-1
4799b2
- Update to upstream version 3.2.2
4799b2
- Merge two javadoc subpackages
4799b2
- Install with XMVn
4799b2
- Specfile cleanup
4799b2
4799b2
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-26
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4799b2
4799b2
* Thu Oct 23 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-25
4799b2
- Remove requires on apache-commons-parent
4799b2
4799b2
* Fri Oct 17 2014 Timothy St. Clair <tstclair@redhat.com> - 3.2.1-24
4799b2
- Fix broken Java 8 build
4799b2
4799b2
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-23
4799b2
- Remove legacy Obsoletes/Provides for jakarta-commons
4799b2
4799b2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-22
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4799b2
4799b2
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-21
4799b2
- Use .mfiles generated during build
4799b2
4799b2
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.2.1-20
4799b2
- Use Requires: java-headless rebuild (#1067528)
4799b2
4799b2
* Mon Aug 12 2013 Mat Booth <fedora@matbooth.co.uk> - 3.2.1-19
4799b2
- Fix FTBFS rhbz #991965
4799b2
4799b2
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-18
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4799b2
4799b2
* Mon Apr 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-17
4799b2
- Remove unneeded BR: maven-idea-plugin
4799b2
4799b2
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-16
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4799b2
4799b2
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.2.1-15
4799b2
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
4799b2
- Replace maven BuildRequires with maven-local
4799b2
4799b2
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-14
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4799b2
4799b2
* Wed Feb 08 2012 Jaromir Capik <jcapik@redhat.com> 3.2.1-13
4799b2
- saxon dependency removed - not needed
4799b2
- minor spec file changes according to the latest guidelines
4799b2
4799b2
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-12
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4799b2
4799b2
* Mon Jun 6 2011 Chris Spike <spike@fedoraproject.org> 3.2.1-11
4799b2
- Added *-testframework depmap entries.
4799b2
4799b2
* Wed Mar 16 2011 Alexander Kurtakov <akurtako@redhat.com> 3.2.1-10
4799b2
- Drop tomcat5 subpackage.
4799b2
4799b2
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-9
4799b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4799b2
4799b2
* Mon Nov 8 2010 Alexander Kurtakov <akurtako@redhat.com> 3.2.1-8
4799b2
- Add commons-collections:commons-collections depmap.
4799b2
4799b2
* Mon Oct 4 2010 Alexander Kurtakov <akurtako@redhat.com> 3.2.1-7
4799b2
- Fix pom name.
4799b2
- Use newer maven plugins names.
4799b2
4799b2
* Tue Aug 31 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-6
4799b2
- Change package to own files in directories, not the directories
4799b2
4799b2
* Mon Aug 30 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-5
4799b2
- Remove source and patches no longer needed for Maven
4799b2
- Fix non-standard groups and remove empty sections
4799b2
- Fix file permissions
4799b2
4799b2
* Sat Aug 28 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-4
4799b2
- Renamed from jakarta-commons-collections
4799b2
- Updated to use maven2
4799b2
- Replaced saxon:group instruction with xsl:for-each-group in pom-maven2jpp-newdepmap.xsl