- Cleanup with spec-cleaner

- Add BuildRoot for SLES builds 
- Disable post-build-check on SLES due to FHS errors

- Drop -src package into separate spec file in order to really
  break a build cycle between tomcat and dbcp

- rename to apache-commons-dbcp
- updating requirements

- Fix build with new javapackages-tools

- Do not require tomcat, it is just test dependency causing cycle
  bnc#954603

- Update the alternatives once more to match docu.

- Fixup the update-alternatives code.
- Get rid of the old maven code that we didn't use

- Cleanup with spec-cleaner

- Move -src subpackage to extra spec file

- Create -src subpackage in order to create tomcat-dbcp.jar without
  build cycles (bnc#847505)

- Move from jpackage-utils to javapackage-tools

OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-dbcp?expand=0&rev=2
This commit is contained in:
Jan Matejek 2016-09-29 11:44:57 +00:00 committed by Git OBS Bridge
parent 5d0d4ca4cd
commit 3a28629a4f
10 changed files with 6859 additions and 1980 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 29 11:44:36 UTC 2016 - jmatejek@suse.com
- rename to apache-commons-dbcp
- updating requirements
-------------------------------------------------------------------
Wed Mar 18 09:47:57 UTC 2015 - tchvatal@suse.com

View File

@ -17,15 +17,17 @@
%define base_name dbcp
%define short_name commons-%{base_name}
%define short_name commons-%{base_name}2
Name: jakarta-commons-dbcp
Version: 1.2.2
Version: 2.1.1
Release: 0
Summary: Jakarta Commons DataBase Pooling Package
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://jakarta.apache.org/commons/dbcp/
Source0: commons-dbcp-1.2.2-src.tar.bz2
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
Source1: pom-maven2jpp-depcat.xsl
Source2: pom-maven2jpp-newdepmap.xsl
Source3: pom-maven2jpp-mapdeps.xsl
@ -34,26 +36,27 @@ Source5: commons-build.tar.bz2
Source7: commons-dbcp-1.2.2.pom
Patch0: commons-dbcp-1.2.2-project_xml.patch
#improved from https://issues.apache.org/jira/browse/DBCP-191
Patch1: java6-compatibility.patch
Patch2: jakarta-commons-dbcp-target15.patch
#http://pkgs.fedoraproject.org/gitweb/?p=apache-commons-dbcp.git;a=blob_plain;f=jdbc41.patch;hb=HEAD
Patch3: jdbc41.patch
BuildRequires: ant >= 1.6.5
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-pool >= 1.3
BuildRequires: apache-commons-logging
BuildRequires: apache-commons-pool2
BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: jdbc-stdext >= 2.0
BuildRequires: junit >= 3.8.1
BuildRequires: xerces-j2
Requires: commons-collections >= 3.2
Requires: commons-pool >= 1.3
Requires: commons-pool2
Requires(post): %{_sbindir}/update-alternatives
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
Requires(preun): %{_sbindir}/update-alternatives
Provides: %{short_name} = %{version}-%{release}
Obsoletes: %{short_name} < %{version}
Provides: hibernate_jdbc_cache
Provides: jakarta-commons-dbcp = %{version}
Obsoletes: jakarta-commons-dbcp < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
#!BuildIgnore: jakarta-commons-dbcp-tomcat5
@ -86,32 +89,18 @@ features.
%prep
%setup -q -n %{short_name}-%{version}-src
# quick hack
cp LICENSE.txt ../LICENSE
#cp LICENSE.txt ../LICENSE
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
bzip2 -dc %{SOURCE5} | tar xf -
%patch0 -b .sav
%patch1 -b .sav1
%patch2 -b .target15
%patch3
#%patch0 -b .sav
#%patch1 -b .sav1
#%patch2 -b .target15
#%patch3
%build
if [ ! -f %{SOURCE4} ]; then
export DEPCAT=$(pwd)/%{base_name}-%{version}-depcat.new.xml
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
echo '<depset>' >> $DEPCAT
for p in $(find . -name project.xml); do
pushd $(dirname $p)
%{_bindir}/saxon project.xml %{SOURCE1} >> $DEPCAT
popd
done
echo >> $DEPCAT
echo '</depset>' >> $DEPCAT
%{_bindir}/saxon $DEPCAT %{SOURCE2} > %{base_name}-%{version}-depmap.new.xml
fi
ant \
-Dcommons-pool.jar=$(build-classpath commons-pool) \
-Dcommons-pool.jar=$(build-classpath commons-pool2) \
-Djdbc20ext.jar=$(build-classpath jdbc-stdext) \
-Djunit.jar=$(build-classpath junit) \
-Dxerces.jar=$(build-classpath xerces-j2) \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a6b35d1f8c25c5fbbc335d0cf81595ede4dd372adc2fb9ace994e996d63b2b5
size 608127

BIN
commons-dbcp2-2.1.1-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iEYEABECAAYFAlW+uDUACgkQzTA4/vB9Vn7jsACeIlk37QS4YyOauaY185Ha+MsW
SqQAoJjbekNH1ziwSRPqsMmWn8aLfs1L
=uAl0
-----END PGP SIGNATURE-----

6825
commons.keyring Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
--- build.xml
+++ build.xml
@@ -142,7 +142,7 @@
<target name="compile" depends="prepare" description="compiles source files">
<mkdir dir="${build.classes.dir}"/>
- <javac destdir="${build.classes.dir}"
+ <javac target="1.5" destdir="${build.classes.dir}"
srcdir="${src.java.dir}"
classpath="${classpath}"
debug="${javac.debug}"
@@ -160,7 +160,7 @@
<target name="compile-test" depends="compile">
<mkdir dir="${build.test-classes.dir}"/>
- <javac destdir="${build.test-classes.dir}"
+ <javac target="1.5" destdir="${build.test-classes.dir}"
srcdir="${src.test.dir}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
@@ -211,4 +211,4 @@
<target name="dist" depends="build" description="gump target"/>
-</project>
\ No newline at end of file
+</project>

File diff suppressed because it is too large Load Diff