- 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

@@ -0,0 +1,76 @@
#
# spec file for package jakarta-commons-dbcp-src
#
# 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
%define short_name commons-%{base_name}
Name: jakarta-commons-dbcp-src
Version: 1.2.2
Release: 0
Summary: Jakarta Commons DataBase Pooling Package src
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://jakarta.apache.org/commons/dbcp/
Source0: commons-dbcp-1.2.2-src.tar.bz2
Source5: commons-build.tar.bz2
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
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.
This package contains a source code, which is intended to break some
bootstrap issues between commons-dbcp and tomcat.
%prep
%setup -q -n %{short_name}-%{version}-src
# quick hack
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
%build
# nope
%install
# source code
install -d -m 0755 %{buildroot}%{_usrsrc}/%{short_name}/
cp -pr src/java %{buildroot}%{_usrsrc}/%{short_name}/
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_usrsrc}/%{short_name}
%changelog