304 lines
11 KiB
RPMSpec
304 lines
11 KiB
RPMSpec
|
%define repodir %{_javadir}/repository.jboss.com/apache-collections/%{version}-brew
|
||
|
%define repodirlib %{repodir}/lib
|
||
|
%define repodirsrc %{repodir}/src
|
||
|
%define maven 0
|
||
|
%define javahome %{_jvmdir}/jdk
|
||
|
Name: jakarta-commons-collections
|
||
|
Version: 3.2.1
|
||
|
Release: 6mamba
|
||
|
Summary: Jakarta Commons Collections Package
|
||
|
Group: Development/Libraries/Java
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
URL: http://jakarta.apache.org/commons/collections
|
||
|
Source0: http://www.apache.org/dist/commons/collections/source/commons-collections-%{version}-src.tar.gz
|
||
|
Source1: jakarta-commons-collections-3.2.1-build.tar.gz
|
||
|
Source2: jakarta-commons-collections-3.2.1-tomcat5-build.xml
|
||
|
Source3: java-component-info3.xml
|
||
|
Source4: maven2-2.2.0-settings.xml
|
||
|
Source5: jakarta-commons-collections-testframework-3.2.1.pom
|
||
|
Source6: jakarta-commons-collections-tomcat5-3.2.1.pom
|
||
|
Patch0: jakarta-commons-collections-3.2.1-javadoc-nonet.patch
|
||
|
Patch1: jakarta-commons-collections-3.2.1-project_xml.patch
|
||
|
Patch2: jakarta-commons-collections-3.2.1-build_xml.patch
|
||
|
Patch3: jakarta-commons-collections-3.2.1-addosgimanifest.patch
|
||
|
License: Apache Software License 2.0
|
||
|
BuildRequires: apache-ant
|
||
|
BuildRequires: apache-ant-junit
|
||
|
%if %maven
|
||
|
BuildRequires: apache-maven2
|
||
|
BuildRequires: apache-maven2-ant-plugin
|
||
|
BuildRequires: apache-maven2-compiler-plugin
|
||
|
BuildRequires: apache-maven2-jar-plugin
|
||
|
BuildRequires: apache-maven2-javadoc-plugin
|
||
|
%endif
|
||
|
%if "%{stage1}" != "1"
|
||
|
BuildRequires: apache-tomcat5-servletapi5
|
||
|
%endif
|
||
|
#BuildRequires: java-clirr
|
||
|
BuildRequires: java-junit3
|
||
|
BuildRequires: jpackage-utils
|
||
|
BuildRequires: objectweb-asm
|
||
|
BuildRequires: xml-commons-apis
|
||
|
Requires: jpackage-utils
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
The introduction of the Collections API by Sun in JDK 1.2 has been a boon to quick and effective Java programming. Ready access to powerful data structures has accelerated development by reducing the need for custom container classes around each core object. Most Java2 APIs are significantly easier to use because of the Collections API.
|
||
|
However, there are certain holes left unfilled by Sun's implementations, and the Jakarta-Commons Collections Component strives to fulfill them. Among the features of this package are:
|
||
|
- special-purpose implementations of Lists and Maps for fast access
|
||
|
- adapter classes from Java1-style containers (arrays, enumerations) to Java2-style collections.
|
||
|
- methods to test or create typical set-theory properties of collections such as union, intersection, and closure.
|
||
|
|
||
|
%package testframework
|
||
|
Group: Development/Tools
|
||
|
Summary: Testframework for %{name}
|
||
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
||
|
%description testframework
|
||
|
Provides new interfaces, implementations and utilities for Java Collections.
|
||
|
|
||
|
%package tomcat5
|
||
|
Group: Development/Libraries/Java
|
||
|
Summary: Jakarta Commons Collection dependency for Tomcat5
|
||
|
|
||
|
%description tomcat5
|
||
|
A package that is specifically designed to fulfill to a Tomcat5 dependency.
|
||
|
|
||
|
%package javadoc
|
||
|
Group: Documentation
|
||
|
Summary: Javadoc for %{name}
|
||
|
|
||
|
%description javadoc
|
||
|
Types that extend and augment the Java Collections Framework.
|
||
|
|
||
|
This package contains javadoc for %{name}
|
||
|
|
||
|
%package testframework-javadoc
|
||
|
Group: Documentation
|
||
|
Summary: Javadoc for %{name}-testframework
|
||
|
|
||
|
%description testframework-javadoc
|
||
|
Types that extend and augment the Java Collections Framework.
|
||
|
|
||
|
This package contains javadoc for %{name}-testframework.
|
||
|
|
||
|
%package repolib
|
||
|
Group: Development/Libraries/Java
|
||
|
Summary: Artifacts to be uploaded to a repository library
|
||
|
|
||
|
%description repolib
|
||
|
Types that extend and augment the Java Collections Framework.
|
||
|
|
||
|
This package contains artifacts to be uploaded to a repository library.
|
||
|
This package is not meant to be installed but so its contents
|
||
|
can be extracted through rpm2cpio
|
||
|
|
||
|
%prep
|
||
|
|
||
|
%setup -q -n commons-collections-%{version}-src
|
||
|
|
||
|
perl -pi -e 's/\r//g' *.txt
|
||
|
sed -i 's/\r//' PROPOSAL.html
|
||
|
|
||
|
%if %maven
|
||
|
cp %{SOURCE4} settings.xml
|
||
|
|
||
|
mkdir -p .m2/repository/JPP/maven2
|
||
|
|
||
|
sed -i -e "s|<localRepository>__INTERNAL_REPO_PLACEHOLDER__</localRepository>|<localRepository>file://`pwd`/external_repo</localRepository>|g" settings.xml
|
||
|
sed -i -e "s|<url>__EXTERNAL_REPO_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
|
||
|
%else
|
||
|
|
||
|
gzip -dc %{S:1} | tar xf -
|
||
|
|
||
|
for j in $(find . -name "*.jar"); do
|
||
|
rm -rf $j
|
||
|
done
|
||
|
|
||
|
%patch0 -p1
|
||
|
%patch1 -p1
|
||
|
# gcj support
|
||
|
#% patch2 -p1
|
||
|
%patch3
|
||
|
cp %{S:2} collections-tomcat5-build.xml
|
||
|
%endif
|
||
|
|
||
|
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
|
||
|
|
||
|
%build
|
||
|
export JAVA_HOME=%javahome
|
||
|
%if %maven
|
||
|
|
||
|
export MAVEN_REPO_LOCAL=$PWD/.m2/repository
|
||
|
export MAVEN_SETTINGS=$PWD/settings.xml
|
||
|
|
||
|
mkdir external_repo
|
||
|
ln -s %{_javadir} external_repo/JPP
|
||
|
|
||
|
mvn-jpp \
|
||
|
-e \
|
||
|
-s $MAVEN_SETTINGS \
|
||
|
-Dmaven.test.failure.ignore=true \
|
||
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||
|
-Dmaven.javadoc.source=1.4 \
|
||
|
install javadoc:javadoc
|
||
|
%else
|
||
|
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28423
|
||
|
# gcj support
|
||
|
# ant -Djava.io.tmpdir=. jar javadoc tf.validate tf.jar dist.bin dist.src tf.javadoc
|
||
|
# clirr-core
|
||
|
export CLASSPATH=$(build-classpath xml-commons-jaxp-1.3-apis servletapi5)
|
||
|
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 ant/ant-junit objectweb-asm/asm):build/classes
|
||
|
ant -Djava.io.tmpdir=. -Dmaven.repo test dist tf.javadoc
|
||
|
ant -f collections-tomcat5-build.xml
|
||
|
%endif
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
mkdir -p %{buildroot}%{_javadir}
|
||
|
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
||
|
|
||
|
install -m 644 build/commons-collections-%{version}.jar \
|
||
|
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||
|
|
||
|
install -m 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-jakarta-commons-collections.pom
|
||
|
%add_to_maven_depmap commons-collections commons-collections %{version} JPP commons-collections
|
||
|
|
||
|
install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/maven2/poms/JPP-jakarta-commons-collections-testframework.pom
|
||
|
%add_to_maven_depmap commons-collections commons-collections-testframework %{version} JPP commons-collections-testframework
|
||
|
|
||
|
install -m 644 build/commons-collections-testframework-%{version}.jar \
|
||
|
%{buildroot}%{_javadir}/%{name}-testframework-%{version}.jar
|
||
|
|
||
|
install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/maven2/poms/JPP-jakarta-commons-collections-tomcat5.pom
|
||
|
%add_to_maven_depmap commons-collections commons-collections-tomcat5 %{version} JPP commons-collections-tomcat5
|
||
|
|
||
|
install -m 644 collections-tomcat5/commons-collections-tomcat5.jar \
|
||
|
%{buildroot}%{_javadir}/%{name}-tomcat5-%{version}.jar
|
||
|
|
||
|
(
|
||
|
cd %{buildroot}%{_javadir}
|
||
|
for jar in *-%{version}*; do
|
||
|
ln -s ${jar} `echo $jar | sed "s|jakarta-||g"`
|
||
|
done
|
||
|
)
|
||
|
(
|
||
|
cd %{buildroot}%{_javadir}
|
||
|
for jar in *-%{version}*; do
|
||
|
ln -s ${jar} `echo $jar | sed "s|-%{version}||g"`
|
||
|
done
|
||
|
)
|
||
|
|
||
|
mkdir -p %{buildroot}%{_javadocdir}/commons-collections-%{version}
|
||
|
cp -pr build/docs/apidocs/* %{buildroot}%{_javadocdir}/commons-collections-%{version}
|
||
|
ln -s commons-collections-%{version} %{buildroot}%{_javadocdir}/commons-collections
|
||
|
rm -rf target/docs/apidocs
|
||
|
|
||
|
mkdir -p %{buildroot}%{_javadocdir}/commons-collections-testframework-%{version}
|
||
|
cp -pr build/docs/testframework/* %{buildroot}%{_javadocdir}/commons-collections-testframework-%{version}
|
||
|
ln -s commons-collections-testframework-%{version} %{buildroot}%{_javadocdir}/commons-collections-testframework
|
||
|
|
||
|
mkdir -p %{buildroot}%{repodir}
|
||
|
mkdir -p %{buildroot}%{repodirlib}
|
||
|
install -m 644 %{SOURCE3} %{buildroot}%{repodir}/component-info.xml
|
||
|
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
|
||
|
sed -i "s/@NAME@/apache-commons-collections/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@ID@/apache-collections/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@TAG@/$tag/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@VERSION@/%{version}-brew/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@LICENSE@/%{license}/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s|@PROJECTHOME@|%{url}|g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@DESCRIPTION@/Jakarta Commons Collections Package: extensions to java.util type of collections/g" \
|
||
|
%{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@ARTIFACTID@/commons-codec.jar/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
sed -i "s/@INCLUDEINPUT@/commons-codec.jar/g" %{buildroot}%{repodir}/component-info.xml
|
||
|
mkdir -p %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{SOURCE0} %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{SOURCE1} %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{SOURCE2} %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{PATCH0} %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{PATCH1} %{buildroot}%{repodirsrc}
|
||
|
install -m 644 %{PATCH2} %{buildroot}%{repodirsrc}
|
||
|
cp %{buildroot}%{_javadir}/jakarta-commons-collections-%{version}.jar %{buildroot}%{repodirlib}/commons-collections.jar
|
||
|
|
||
|
# gcj support
|
||
|
#%{_bindir}/aot-compile-rpm
|
||
|
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
%post
|
||
|
%update_maven_depmap
|
||
|
|
||
|
%postun
|
||
|
%update_maven_depmap
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadir}/commons-collections-%{version}.jar
|
||
|
%{_javadir}/commons-collections.jar
|
||
|
%{_javadir}/jakarta-commons-collections-%{version}.jar
|
||
|
%{_javadir}/jakarta-commons-collections.jar
|
||
|
%{_datadir}/maven2/poms/JPP-jakarta-commons-collections.pom
|
||
|
%{_mavendepmapfragdir}
|
||
|
%doc LICENSE.txt NOTICE.txt
|
||
|
%doc PROPOSAL.html README.txt RELEASE-NOTES.html
|
||
|
|
||
|
%files testframework
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadir}/commons-collections-testframework-%{version}.jar
|
||
|
%{_javadir}/commons-collections-testframework.jar
|
||
|
%{_javadir}/jakarta-commons-collections-testframework-%{version}.jar
|
||
|
%{_javadir}/jakarta-commons-collections-testframework.jar
|
||
|
%{_datadir}/maven2/poms/JPP-jakarta-commons-collections-testframework.pom
|
||
|
|
||
|
%files tomcat5
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadir}/commons-collections-tomcat5-%{version}.jar
|
||
|
%{_javadir}/commons-collections-tomcat5.jar
|
||
|
%{_javadir}/jakarta-commons-collections-tomcat5-%{version}.jar
|
||
|
%{_javadir}/jakarta-commons-collections-tomcat5.jar
|
||
|
%{_datadir}/maven2/poms/JPP-jakarta-commons-collections-tomcat5.pom
|
||
|
%doc LICENSE.txt NOTICE.txt
|
||
|
|
||
|
%files javadoc
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadocdir}/commons-collections-%{version}
|
||
|
%{_javadocdir}/commons-collections
|
||
|
|
||
|
%files testframework-javadoc
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadocdir}/commons-collections-testframework-%{version}
|
||
|
%{_javadocdir}/commons-collections-testframework
|
||
|
|
||
|
%files repolib
|
||
|
%defattr(-,root,root)
|
||
|
%{repodir}
|
||
|
|
||
|
%changelog
|
||
|
* Thu Mar 24 2011 gil <puntogil@libero.it> 3.2.1-6mamba
|
||
|
- rebuilt with java-openjdk support
|
||
|
|
||
|
* Sat Oct 30 2010 gil <puntogil@libero.it> 3.2.1-5mamba
|
||
|
- rebuilt devel
|
||
|
|
||
|
* Sat Jan 09 2010 gil <puntogil@libero.it> 3.2.1-4mamba
|
||
|
- added maven poms
|
||
|
- added osgi manifest
|
||
|
|
||
|
* Tue Oct 20 2009 gil <puntogil@libero.it> 3.2.1-3mamba
|
||
|
- added new sub package: repolib
|
||
|
|
||
|
* Mon Mar 09 2009 gil <puntogil@libero.it> 3.2.1-2mamba
|
||
|
- added new sub package: tomcat5
|
||
|
|
||
|
* Thu Feb 19 2009 gil <puntogil@libero.it> 3.2.1-1mamba
|
||
|
- package created by autospec
|