2016-09-29 13:27:49 +02:00
|
|
|
#
|
|
|
|
# spec file for package jakarta-commons-dbcp
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define base_name dbcp
|
2016-09-29 13:44:57 +02:00
|
|
|
%define short_name commons-%{base_name}2
|
2016-09-29 13:27:49 +02:00
|
|
|
Name: jakarta-commons-dbcp
|
2016-09-29 13:44:57 +02:00
|
|
|
Version: 2.1.1
|
2016-09-29 13:27:49 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Jakarta Commons DataBase Pooling Package
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
2016-09-29 13:44:57 +02:00
|
|
|
Url: https://commons.apache.org/proper/commons-dbcp/
|
|
|
|
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
|
|
|
Source100: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
|
|
|
|
Source101: commons.keyring
|
2016-09-29 13:27:49 +02:00
|
|
|
BuildRequires: ant >= 1.6.5
|
2016-09-29 13:44:57 +02:00
|
|
|
BuildRequires: apache-commons-logging
|
|
|
|
BuildRequires: apache-commons-pool2
|
2016-09-29 13:27:49 +02:00
|
|
|
BuildRequires: java-devel
|
|
|
|
BuildRequires: javapackages-tools
|
|
|
|
BuildRequires: jdbc-stdext >= 2.0
|
|
|
|
BuildRequires: junit >= 3.8.1
|
|
|
|
BuildRequires: xerces-j2
|
|
|
|
Requires: commons-collections >= 3.2
|
2016-09-29 13:44:57 +02:00
|
|
|
Requires: commons-pool2
|
2016-09-29 13:56:37 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2016-09-29 13:27:49 +02:00
|
|
|
Provides: %{short_name} = %{version}-%{release}
|
2016-09-29 13:44:57 +02:00
|
|
|
Obsoletes: %{short_name} < %{version}
|
2016-09-29 13:27:49 +02:00
|
|
|
Provides: hibernate_jdbc_cache
|
2016-09-29 13:44:57 +02:00
|
|
|
Provides: jakarta-commons-dbcp = %{version}
|
|
|
|
Obsoletes: jakarta-commons-dbcp < %{version}
|
2016-09-29 13:27:49 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
The DBCP package creates and maintains a database connection pool
|
|
|
|
package written in the Java language to be distributed under the ASF
|
|
|
|
license. The package is available as a pseudo-JDBC driver and via a
|
|
|
|
DataSource interface. The package also supports multiple logins to
|
|
|
|
multiple database systems, reclamation of stale or dead connections,
|
|
|
|
testing for valid connections, PreparedStatement pooling, and other
|
|
|
|
features.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for jakarta-commons-dbcp
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package contains the javadoc documentation for the DBCP package.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
|
|
# remove all binary libs
|
|
|
|
find . -name "*.jar" -exec rm -f {} \;
|
|
|
|
|
|
|
|
%build
|
|
|
|
ant \
|
2016-09-29 13:44:57 +02:00
|
|
|
-Dcommons-pool.jar=$(build-classpath commons-pool2) \
|
2016-09-29 13:27:49 +02:00
|
|
|
-Djdbc20ext.jar=$(build-classpath jdbc-stdext) \
|
|
|
|
-Djunit.jar=$(build-classpath junit) \
|
|
|
|
-Dxerces.jar=$(build-classpath xerces-j2) \
|
|
|
|
-Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
|
|
|
|
-Dnaming-common.jar=$(build-classpath tomcat/catalina) \
|
|
|
|
-Dnaming-java.jar=$(build-classpath tomcat/catalina) \
|
2016-09-29 13:51:55 +02:00
|
|
|
-Dcommons-logging.jar=$(build-classpath commons-logging) \
|
2016-09-29 13:27:49 +02:00
|
|
|
-Djava.io.tmpdir=. \
|
|
|
|
dist
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
|
|
|
install -m 644 dist/%{short_name}.jar %{buildroot}%{_javadir}/%{name}-%{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)
|
|
|
|
# pom
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -pm 644 %{SOURCE7} \
|
|
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap
|
|
|
|
# javadoc
|
|
|
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
# quick hack clean up
|
|
|
|
rm ../LICENSE
|
|
|
|
# hibernate_jdbc_cache ghost symlink
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar %{buildroot}%{_javadir}/hibernate_jdbc_cache.jar
|
|
|
|
|
|
|
|
%post
|
|
|
|
update-alternatives --install %{_javadir}/hibernate_jdbc_cache.jar \
|
|
|
|
hibernate_jdbc_cache %{_javadir}/%{name}.jar 60
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}.jar
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE.txt
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%{_javadir}/%{name}-%{version}.jar
|
|
|
|
%{_javadir}/%{short_name}.jar
|
|
|
|
%{_javadir}/%{short_name}-%{version}.jar
|
|
|
|
%{_javadir}/hibernate_jdbc_cache.jar
|
|
|
|
%ghost %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar
|
|
|
|
%{_mavenpomdir}/*
|
|
|
|
%{_datadir}/maven-metadata/%{name}.xml
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|