packages jakarta-commons-dbcp.spec
      Pages: < 1 >  DOWNLOAD      
Name:          jakarta-commons-dbcp
Version:       1.2.2
Release:       1mamba
Summary:       Jakarta Commons DBCP (Database Connection Pools) Package
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://commons.apache.org/dbcp/
#Source0:       http://mirror.nohup.it/apache/commons/dbcp/source/commons-dbcp-1.2.2-src.tar.gz
Source0:       http://archive.apache.org/dist/commons/dbcp/binaries/commons-dbcp-1.2.2.tar.gz
#  http://archive.apache.org/dist/jakarta/commons/dbcp/source/commons-dbcp-%{version}-src.tar.gz
# svn export -r  '{2007-02-15}' http://svn.apache.org/repos/asf/commons/proper/commons-build/trunk/ jakarta-commons-build-dbcp
# tar czf jakarta-commons-build-dbcp.tar.gz jakarta-commons-build-dbcp
Source1:       jakarta-commons-build-dbcp.tar.gz
Source2:       jakarta-commons-dbcp-1.2.1-tomcat5-build.xml
Patch0:        jakarta-commons-dbcp-1.2.1-project_xml.patch
Patch1:        jakarta-commons-dbcp-1.2.1-TestJOCLed.patch
Patch2:        jakarta-commons-dbcp-1.2.1-TestConnectionPool.patch
Patch3:        jakarta-commons-dbcp-1.2.1-navigation_xml.patch
Patch4:        jakarta-commons-dbcp-1.2.1-project_properties.patch
Patch5:        jakarta-commons-dbcp-1.2.2-project_xml.patch
License:       Apache License Version 2.0
BuildRequires: apache-ant
BuildRequires: jakarta-commons-collections
#BuildRequires: jakarta-commons-collections-tomcat5
BuildRequires: jakarta-commons-pool
BuildRequires: jakarta-commons-pool-tomcat5
BuildRequires: java-junit3
# Under Sun Binary Code License:
#BuildRequires: java-sun-jdbc-stdext
#BuildRequires: java-sun-jndi
BuildRequires: jpackage-utils
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
#BuildRequires:  tomcat5-common-lib
Requires:      jakarta-commons-collections
Requires:      jakarta-commons-pool
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The DBCP package shall create and maintain a database connection pool
package written in the Java language to be distributed under the ASF
license. The package shall be available as a pseudo-JDBC driver and
via a DataSource interface. The package shall also support multiple
logins to multiple database systems, reclamation of stale or dead
connections, testing for valid connections, PreparedStatement
pooling, and other features.

%package javadoc
Group:	  Documentation
Summary:  Javadoc for %{name}

%description javadoc
Jakarta Commons DBCP (Database Connection Pools) Package.

This package contains javadoc for %{name}

%package manual
Group:	  Documentation
Summary:  Documents for %{name}

%description manual
Jakarta Commons DBCP (Database Connection Pools) Package.

This package contains documents for %{name}.

%package tomcat5
Group:	  Development/Libraries/Java
Summary:  Pool dependency for Tomcat5

%description tomcat5
Jakarta Commons DBCP (Database Connection Pools) Package.

This package contains DBCP dependency for Tomcat5.

%prep

%setup -q -n commons-dbcp-%{version}
#-src -a 1
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#eof
#for j in $(find . -name "*.jar"); do
#	mv $j ${j}.no
#done

#cp %{S:2} tomcat5-build.xml

sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' NOTICE.txt
sed -i 's/\r//' README.txt
sed -i 's/\r//' RELEASE-NOTES.txt
%build
#export CLASSPATH=$(build-classpath commons-pool commons-collections-3.2.1 xerces-j2):%{_javadir}-ext/jdbc-stdext-2.0.1.jar
#ant \
#        -Dbuild.sysclasspath=first \
#        -Dcommons-pool.jar=$(build-classpath commons-pool-1.3) \
#        -Dcommons-collections.jar=$(build-classpath commons-collections-3.2.1) \
#        -Djunit.jar=$(build-classpath junit-3.8.2) \
##        -Djndi.jar=$(build-classpath jndi) \
#        -Dsax2.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
#        -Djava.io.tmpdir=. \
#        build-jar javadoc
#export CLASSPATH=$(build-classpath commons-pool commons-collections jdbc-stdext xerces-j2 junit-3.8.2)
#ant -Djava.io.tmpdir=. dist

#export CLASSPATH=$(build-classpath xerces-j2 commons-collections-tomcat5-3.2.1 commons-pool-tomcat5-1.3):%{_javadir}-ext/jdbc-stdext-2.0.1.jar
#ant -f tomcat5-build.xml

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}

install -p -m 644 commons-dbcp-%{version}.jar \
	%{buildroot}%{_javadir}/%{name}-%{version}.jar
#install -p -m 644 dbcp-tomcat5/commons-dbcp-tomcat5.jar \
#	%{buildroot}%{_javadir}/%{name}-tomcat5-%{version}.jar
#
(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
	done
)

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
	done
)

mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} 
rm -rf docs/apidocs
#%{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/commons-dbcp-%{version}.jar
%{_javadir}/commons-dbcp.jar
%{_javadir}/jakarta-commons-dbcp-%{version}.jar
%{_javadir}/jakarta-commons-dbcp.jar
%doc README.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%files manual
%defattr(-,root,root)
%doc docs

%changelog
* Sun Mar 08 2009 gil <puntogil@...> 1.2.2-1mamba
- package created by autospec