automatic version update by autodist [release 2.8.0-1mamba;Mon Jun 07 2021]

This commit is contained in:
Automatic Build System 2024-01-05 20:28:00 +01:00
parent 2ddab3696d
commit 39572311c0
2 changed files with 30 additions and 207 deletions

View File

@ -1,10 +1,4 @@
# apache-commons-dbcp
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.
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.

View File

@ -1,82 +1,26 @@
%define maven 0
%if %maven
%define target_dir target
%define api_dir %target_dir/site/apidocs
%else
%define target_dir dist
%define api_dir %target_dir/docs/api
%endif
Name: apache-commons-dbcp
Version: 1.4
Version: 2.8.0
Release: 1mamba
Summary: Apache Commons DBCP (Commons Database Connection Pooling)
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://commons.apache.org/dbcp/
# https://issues.apache.org/jira/secure/attachment/12362389/patch.txt
# svn export http://svn.apache.org/repos/asf/commons/proper/dbcp/trunk commons-dbcp-1.3
# tar czf commons-dbcp-1.3-SNAPSHOT-svn-src.tar.gz commons-dbcp-1.3
Source0: http://www.apache.org/dist/commons/dbcp/source/commons-dbcp-1.4-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
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://commons.apache.org/proper/commons-dbcp/
Source0: https://downloads.apache.org/commons/dbcp/source/commons-dbcp2-%{version}-src.tar.gz
Source1: maven2-2.2.0-settings.xml
Source2: apache-commons-dbcp-1.4-autogeneratedfiles.tar.gz
Patch0: apache-commons-dbcp-1.3-build_xml.patch
License: Apache Software License Version 2.0
BuildRequires: apache-ant
BuildRequires: apache-commons-pool
BuildRequires: apache-geronimo-1.2-specs
%if %maven
BuildRequires: apache-maven2
BuildRequires: apache-maven2-ant-plugin
BuildRequires: apache-maven2-assembly-plugin
BuildRequires: apache-maven2-changes-plugin
BuildRequires: apache-maven2-checkstyle-plugin
BuildRequires: apache-maven2-compiler-plugin
BuildRequires: apache-maven2-install-plugin
BuildRequires: apache-maven2-jar-plugin
BuildRequires: apache-maven2-javadoc-plugin
BuildRequires: apache-maven2-pmd-plugin
#BuildRequires: felix-maven-bundle-plugin
#BuildRequires: mojo clirr-maven-plugin
#BuildRequires: mojo cobertura-maven-plugin
%endif
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-collections-tomcat5
BuildRequires: jakarta-commons-logging
BuildRequires: java-backport-util-concurrent
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: libtomcat5-common
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: apache-commons-pool
Requires: jakarta-commons-collections
BuildRoot: %{_tmppath}/%{name}-%{version}-root
#check_message:
# [echo] Could not find ${naming-java.jar}
%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
Apache Commons DBCP (Database Connection Pools) Package.
This package contains javadoc for %{name}
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 manual
Group: Documentation
@ -84,149 +28,42 @@ Summary: Documents for %{name}
%description manual
Apache 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
Apache Commons DBCP (Database Connection Pools) Package.
This package contains DBCP dependency for Tomcat5.
%prep
%setup -q -n commons-dbcp-%{version}-src
for j in $(find . -name "*.jar"); do
mv $j ${j}.no
done
%if %maven
mv build.xml build.xml-old
cp %{SOURCE1} 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
tar -xzf %{SOURCE2}
%patch0 -p0
%endif
cp %{S:2} tomcat5-build.xml
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' NOTICE.txt
sed -i 's/\r//' README.txt
%setup -q -n commons-dbcp2-%{version}-src -D -T
%build
export JAVA_HOME=/usr/lib/jvm/jdk-gcj
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
%if %maven
mkdir external_repo
ln -s %{_javadir} external_repo/JPP
mvn-jpp \
-e \
-s $(pwd)/settings.xml \
-Dmaven.test.failure.ignore=true \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
ant:ant org.apache.felix:maven-bundle-plugin:ant install javadoc:javadoc
%else
export CLASSPATH=$(build-classpath pool/apache-commons-pool commons-collections \
xerces-j2 tomcat5/naming-factory tomcat5/naming-resources \
geronimo/jta-1.1-api geronimo/ejb-2.1-api geronimo/ejb-3.0-api \
backport-util-concurrent):$java_home/jre/lib/rt.jar
ant \
-Dbuild.sysclasspath=first \
-Dcommons-pool.jar=$(build-classpath pool/apache-commons-pool) \
-Dcommons-collections.jar=$(build-classpath commons-collections) \
-Djunit.jar=$(build-classpath junit-3.8.2) \
-Djndi.jar=$JAVA_HOME/jre/lib/rt.jar \
-Dsax2.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
-Djdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar \
-Dcommons-logging.jar=$(build-classpath commons-logging) \
-Dxerces.jar=$(build-classpath xerces-j2) \
-Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
-Djta-spec.jar=$(build-classpath geronimo/jta-1.0.1B-api) \
-Djta-impl.jar=$(build-classpath geronimo/jta-1.1-api) \
-Dbackport-util-concurrent.jar=$(build-classpath backport-util-concurrent) \
-Dejb-spec.jar=$(build-classpath geronimo/ejb-2.1-api-1.1) \
-Dnaming-common.jar=$(build-classpath tomcat5/naming-resources) \
-Dnaming-java=$JAVA_HOME/jre/lib/rt.jar \
-Djava.io.tmpdir=. \
-Dname=commons-dbcp-%{version} \
build-jar javadoc
mkdir -p pool/dist/
ln -sf $(build-classpath pool/apache-commons-pool) pool/dist/commons-pool.jar
export CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2)
ant \
-Djdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar \
-Djunit.jar=$(build-classpath junit-3.8.2) \
-Dcommons-pool.jar=$(build-classpath pool/apache-commons-pool) \
-Dcommons-logging.jar=$(build-classpath commons-logging) \
-Dxerces.jar=$(build-classpath xerces-j2) \
-Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
-Djta-spec.jar=$(build-classpath geronimo/jta-1.0.1B-api) \
-Djta-impl.jar=$(build-classpath geronimo/jta-1.1-api) \
-Dbackport-util-concurrent.jar=$(build-classpath backport-util-concurrent) \
-Dejb-spec.jar=$(build-classpath geronimo/ejb-2.1-api) \
-Djta-impl.jar=$(build-classpath geronimo/jta-1.1-api) \
-Dnaming-common.jar=$(build-classpath tomcat5/naming-resources) \
-Dnaming-java=$JAVA_HOME/jre/lib/rt.jar \
-Dname=commons-dbcp-%{version} \
-Djava.io.tmpdir=. prepare dist
%endif
export CLASSPATH=$CLASSPATH:$(build-classpath commons-collections-tomcat5 pool/apache-commons-pool)
#ant -f tomcat5-build.xml
:<< _EOF
mvn -Drat.ignoreErrors=true clean package
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}/dbcp
mkdir -p %{buildroot}%{_javadir}/dbcp2
install -p -m 644 %target_dir/commons-dbcp-%{version}.jar \
%{buildroot}%{_javadir}/dbcp/%{name}-%{version}.jar
#install -p -m 644 pool-tomcat5/commons-dbcp-tomcat5.jar \
# %{buildroot}%{_javadir}/dbcp/%{name}-tomcat5-%{version}.jar
install -p -m 644 %target_dir/commons-dbcp2-%{version}.jar \
%{buildroot}%{_javadir}/dbcp2/apache-commons-dbcp2-%{version}.jar
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.dbcp-commons-pool.pom
%add_to_maven_depmap org.apache.commons commons-dbcp %{version} JPP/dbcp commons-pool
%add_to_maven_depmap commons-dbcp commons-dbcp %{version} JPP/dbcp commons-pool
# %add_to_maven_depmap org.apache.commons commons-dbcp %{version} JPP/dbcp commons-pool
#% add_to_maven_depmap commons-dbcp commons-dbcp %{version} JPP/dbcp commons-pool
(
cd %{buildroot}%{_javadir}/dbcp
cd %{buildroot}%{_javadir}/dbcp2
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
done
)
(
cd %{buildroot}%{_javadir}/dbcp
cd %{buildroot}%{_javadir}/dbcp2
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr %api_dir/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
#%{_bindir}/aot-compile-rpm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -238,31 +75,23 @@ ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%files
%defattr(-,root,root)
%{_javadir}/dbcp/apache-commons-dbcp-%{version}.jar
%{_javadir}/dbcp/apache-commons-dbcp.jar
%{_javadir}/dbcp/commons-dbcp-%{version}.jar
%{_javadir}/dbcp/commons-dbcp.jar
%dir %{_javadir}/dbcp2
%{_javadir}/dbcp2/apache-commons-dbcp2-%{version}.jar
%{_javadir}/dbcp2/apache-commons-dbcp2.jar
%{_javadir}/dbcp2/commons-dbcp2-%{version}.jar
%{_javadir}/dbcp2/commons-dbcp2.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt NOTICE.txt README.txt
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/apache-commons-dbcp-%{version}
%{_javadocdir}/apache-commons-dbcp
%doc LICENSE.txt
%files manual
%defattr(-,root,root)
%doc doc
#%files tomcat5
#%defattr(-,root,root)
#%{_javadir}/dbcp/apache-commons-dbcp-tomcat5-%{version}.jar
#%{_javadir}/dbcp/apache-commons-dbcp-tomcat5.jar
#%{_javadir}/dbcp/commons-dbcp-tomcat5-%{version}.jar
#%{_javadir}/dbcp/commons-dbcp-tomcat5.jar
%doc NOTICE.txt README.txt
%changelog
* Mon Jun 07 2021 Automatic Build System <autodist@mambasoft.it> 2.8.0-1mamba
- automatic version update by autodist
* Mon Feb 28 2011 gil <puntogil@libero.it> 1.4-1mamba
- update to 1.4