Initial import (#628280).
This commit is contained in:
parent
a37aaf2680
commit
cc0b531b48
210
apache-commons-collections.spec
Normal file
210
apache-commons-collections.spec
Normal file
@ -0,0 +1,210 @@
|
||||
%global base_name collections
|
||||
%global short_name commons-%{base_name}
|
||||
|
||||
Name: apache-%{short_name}
|
||||
Version: 3.2.1
|
||||
Release: 6%{?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
|
||||
Source6: collections-tomcat5-build.xml
|
||||
|
||||
Patch0: jakarta-%{short_name}-javadoc-nonet.patch
|
||||
Patch4: commons-collections-3.2-build_xml.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: maven2
|
||||
BuildRequires: maven2-plugin-antrun
|
||||
BuildRequires: maven2-plugin-assembly
|
||||
BuildRequires: maven2-plugin-compiler
|
||||
BuildRequires: maven2-plugin-jar
|
||||
BuildRequires: maven2-plugin-javadoc
|
||||
BuildRequires: maven2-plugin-idea
|
||||
BuildRequires: maven2-plugin-install
|
||||
BuildRequires: maven2-plugin-resources
|
||||
BuildRequires: maven-doxia-sitetools
|
||||
BuildRequires: maven-plugin-bundle
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: ant
|
||||
BuildRequires: saxon
|
||||
BuildRequires: saxon-scripts
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
Requires(post):jpackage-utils
|
||||
Requires(postun):jpackage-utils
|
||||
|
||||
Provides: jakarta-%{short_name} = %{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
|
||||
|
||||
%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
|
||||
Summary: Testframework for %{name}
|
||||
Group: Development/Tools
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: jakarta-%{short_name}-testframework = %{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name}-testframework < %{version}-%{release}
|
||||
|
||||
%description testframework
|
||||
%{summary}.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: jpackage-utils
|
||||
Provides: jakarta-%{short_name}-javadoc = %{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name}-javadoc < %{version}-%{release}
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%package tomcat5
|
||||
Summary: Jakarta Commons Collection dependency for Tomcat5
|
||||
Group: Development/Libraries
|
||||
|
||||
%description tomcat5
|
||||
A package that is specifically designed to fulfill to a Tomcat5 dependency.
|
||||
|
||||
%package testframework-javadoc
|
||||
Summary: Javadoc for %{name}-testframework
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: jakarta-%{short_name}-testframework-javadoc = %{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name}-testframework-javadoc < %{version}-%{release}
|
||||
|
||||
%description testframework-javadoc
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q -n %{short_name}-%{version}-src
|
||||
# remove all binary libs
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
|
||||
%patch0 -p1
|
||||
%patch4 -b .sav
|
||||
cp %{SOURCE6} .
|
||||
|
||||
# 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
|
||||
|
||||
%build
|
||||
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mkdir -p $MAVEN_REPO_LOCAL
|
||||
|
||||
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
|
||||
|
||||
export MAVEN_HOME_LOCAL=$(pwd)/.maven
|
||||
|
||||
ant tf.javadoc
|
||||
|
||||
# commons-collections-tomcat5
|
||||
ant -f collections-tomcat5-build.xml
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-maven-archiver.pom
|
||||
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
|
||||
install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
install -m 644 target/%{short_name}-testframework-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-testframework-%{version}.jar
|
||||
|
||||
# tomcat5
|
||||
install -m 644 collections-tomcat5/%{short_name}-tomcat5.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-tomcat5-%{version}.jar
|
||||
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done)
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
|
||||
# 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
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc PROPOSAL.html README.txt LICENSE.txt RELEASE-NOTES.html NOTICE.txt
|
||||
%{_datadir}/maven2/poms/*
|
||||
%{_mavendepmapfragdir}/*
|
||||
%{_javadir}/%{name}-%{version}.jar
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{short_name}-%{version}.jar
|
||||
%{_javadir}/%{short_name}.jar
|
||||
|
||||
%files testframework
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/%{name}-testframework-%{version}.jar
|
||||
%{_javadir}/%{name}-testframework.jar
|
||||
%{_javadir}/%{short_name}-testframework-%{version}.jar
|
||||
%{_javadir}/%{short_name}-testframework.jar
|
||||
|
||||
%files tomcat5
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/*-tomcat5*.jar
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files testframework-javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadocdir}/%{name}-testframework-%{version}
|
||||
%{_javadocdir}/%{name}-testframework
|
||||
|
||||
%changelog
|
||||
* Tue Aug 30 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-6
|
||||
- Change package to own files in directories, not the directories
|
||||
|
||||
* Mon Aug 30 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-5
|
||||
- Remove source and patches no longer needed for Maven
|
||||
- Fix non-standard groups and remove empty sections
|
||||
- Fix file permissions
|
||||
|
||||
* Sat Aug 28 2010 Carl Green <carlgreen at gmail.com> - 3.2.1-4
|
||||
- Renamed from jakarta-commons-collections
|
||||
- Updated to use maven2
|
||||
- Replaced saxon:group instruction with xsl:for-each-group in pom-maven2jpp-newdepmap.xsl
|
70
collections-tomcat5-build.xml
Normal file
70
collections-tomcat5-build.xml
Normal file
@ -0,0 +1,70 @@
|
||||
<project name="commons-collections-tomcat5" default="build" basedir=".">
|
||||
|
||||
<property name="tomcat-collections.home" value="collections-tomcat5"/>
|
||||
<property name="commons-collections.home" value="."/>
|
||||
<property name="tomcat-collections.jar" value="commons-collections-tomcat5.jar"/>
|
||||
|
||||
<!-- Java Options -->
|
||||
<property name="compile.debug" value="true"/>
|
||||
<property name="compile.deprecation" value="false"/>
|
||||
<property name="compile.source" value="1.4"/>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${tomcat-collections.home}"/>
|
||||
</target>
|
||||
|
||||
<target name="build">
|
||||
<copy todir="${tomcat-collections.home}">
|
||||
<fileset dir="${commons-collections.home}" >
|
||||
<include name="**/collections/CursorableLinkedList.java" />
|
||||
<include name="**/collections/KeyValue.java" />
|
||||
<include name="**/collections/LRUMap.java" />
|
||||
<include name="**/collections/SequencedHashMap.java" />
|
||||
</fileset>
|
||||
<!-- <fileset dir="${commons-pool.home}">
|
||||
<include name="**/*.java" />
|
||||
<exclude name="**/Stack*.java" />
|
||||
<exclude name="**/SoftReferenceObjectPool.java" />
|
||||
<exclude name="**/test/**" />
|
||||
</fileset>
|
||||
<fileset dir="${commons-dbcp.home}">
|
||||
<include name="**/*.java" />
|
||||
<exclude name="**/test/**" />
|
||||
<exclude name="${tomcat-dbcp.home}/**"/>
|
||||
</fileset> -->
|
||||
</copy>
|
||||
<replace dir="${tomcat-collections.home}/src/java/org/apache/commons">
|
||||
<replacefilter token="return UnmodifiableList.decorate(l);"
|
||||
value="return l;" />
|
||||
<replacefilter token="import org.apache.commons.collections.list.UnmodifiableList;"
|
||||
value=" " />
|
||||
</replace>
|
||||
<replace dir="${tomcat-collections.home}/src/java/org/apache/commons" >
|
||||
<replacefilter token="org.apache.commons"
|
||||
value="org.apache.tomcat.dbcp" />
|
||||
</replace>
|
||||
<mkdir dir="${tomcat-collections.home}/src/java/org/apache/tomcat/dbcp" />
|
||||
<move todir="${tomcat-collections.home}/src/java/org/apache/tomcat/dbcp">
|
||||
<fileset dir="${tomcat-collections.home}/src/java/org/apache/commons" />
|
||||
</move>
|
||||
<mkdir dir="${tomcat-collections.home}/classes"/>
|
||||
<javac destdir="${tomcat-collections.home}/classes"
|
||||
optimize="off"
|
||||
debug="${compile.debug}"
|
||||
deprecation="${compile.deprecation}"
|
||||
source="${compile.source}"
|
||||
sourcepath="${tomcat-collections.home}/src/java"
|
||||
srcdir="${tomcat-collections.home}/src/java" >
|
||||
<include name="**" />
|
||||
</javac>
|
||||
<jar destfile="${tomcat-collections.home}/${tomcat-collections.jar}"
|
||||
index="true">
|
||||
<fileset dir="${tomcat-collections.home}/classes">
|
||||
<include name="**/*.class" />
|
||||
<include name="**/*.properties" />
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
20
commons-collections-3.2-build_xml.patch
Normal file
20
commons-collections-3.2-build_xml.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- 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 @@
|
||||
<!-- Runs all tests -->
|
||||
<target name="-test-all" depends="compile.tests" unless="testcase">
|
||||
<mkdir dir="${build.test.reports}"/>
|
||||
- <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
|
||||
+ <junit printsummary="yes" haltonfailure="no" showoutput="yes">
|
||||
<formatter type="brief" />
|
||||
<classpath>
|
||||
<pathelement location="${build.classes}"/>
|
||||
@@ -331,7 +331,7 @@
|
||||
<target name="testjar" depends="compile.tests,jar"
|
||||
description="Run all unit test cases">
|
||||
<echo message="Running collections tests against built jar ..."/>
|
||||
- <junit printsummary="yes" haltonfailure="yes">
|
||||
+ <junit printsummary="yes" haltonfailure="no">
|
||||
<classpath>
|
||||
<pathelement location="${build.jar.name}"/>
|
||||
<pathelement location="${build.tests}"/>
|
26
jakarta-commons-collections-javadoc-nonet.patch
Normal file
26
jakarta-commons-collections-javadoc-nonet.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- 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 @@
|
||||
|
||||
<!-- Javadoc -->
|
||||
<property name="javadoc.access" value="protected"/>
|
||||
- <property name="javadoc.links" value="http://java.sun.com/j2se/1.3/docs/api/"/>
|
||||
|
||||
<!-- JUnit -->
|
||||
<property name="test.failonerror" value="true"/>
|
||||
@@ -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"
|
Loading…
Reference in New Issue
Block a user