Sync from SUSE:SLFO:Main apache-commons-dbcp revision ffb4bd9a9ce5d66f11dceda322d150b4

This commit is contained in:
Adrian Schröter 2024-05-31 14:28:13 +02:00
parent 9cd07e667b
commit c10834a745
2 changed files with 22 additions and 27 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Apr 30 10:54:53 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Simplify spec: remove old macros and avoid versioned jars
-------------------------------------------------------------------
Tue Feb 20 11:04:20 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %autosetup macro. Allows to eliminate the usage of deprecated
%patchN.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 15 13:35:14 UTC 2019 - Fridrich Strba <fstrba@suse.com> Mon Apr 15 13:35:14 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package apache-commons-dbcp # spec file for package apache-commons-dbcp
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -36,13 +36,10 @@ BuildRequires: apache-commons-pool2
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: geronimo-jta-1_1-api BuildRequires: geronimo-jta-1_1-api
BuildRequires: java-devel >= 1.7 BuildRequires: java-devel >= 1.7
BuildRequires: javapackages-local BuildRequires: javapackages-local >= 6
BuildRequires: jdbc-stdext >= 2.0 BuildRequires: jdbc-stdext >= 2.0
BuildRequires: junit >= 3.8.1 BuildRequires: junit >= 3.8.1
BuildRequires: xerces-j2 BuildRequires: xerces-j2
Requires: commons-collections >= 3.2
Requires: commons-pool2
Requires: jta_api >= 1.1
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(preun): update-alternatives Requires(preun): update-alternatives
Provides: %{short_name} = %{version}-%{release} Provides: %{short_name} = %{version}-%{release}
@ -77,14 +74,11 @@ testing for valid connections, PreparedStatement pooling, and other
features. features.
%prep %prep
%setup -q -n %{short_name}-%{version}-src %autosetup -p1 -n %{short_name}-%{version}-src
%patch0 -p1
%patch1 -p1
# remove all binary libs # remove all binary libs
find . -name "*.jar" -exec rm -f {} \; find . -name "*.jar" -exec rm -f {} \;
%pom_remove_parent .
%build %build
ant \ ant \
-Dcommons-pool.jar=$(build-classpath commons-pool2) \ -Dcommons-pool.jar=$(build-classpath commons-pool2) \
@ -99,14 +93,13 @@ ant \
%install %install
# jars # jars
install -d -m 755 %{buildroot}%{_javadir} install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}2-%{version}.jar install -m 0644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}2.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) ln -sf %{_javadir}/%{name}2.jar %{buildroot}%{_javadir}/%{short_name}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# pom # pom
install -d -m 755 %{buildroot}%{_mavenpomdir} install -d -m 0755 %{buildroot}%{_mavenpomdir}
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}2-%{version}.pom %mvn_install_pom pom.xml %{buildroot}%{_mavenpomdir}/%{name}2.pom
%add_maven_depmap %{name}2-%{version}.pom %{name}2-%{version}.jar %add_maven_depmap %{name}2.pom %{name}2.jar
# javadoc # javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
@ -125,20 +118,11 @@ if [ $1 -eq 0 ] ; then
update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}2.jar update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}2.jar
fi fi
%files %files -f .mfiles
%license LICENSE.txt %license LICENSE.txt
%{_javadir}/%{name}2.jar
%{_javadir}/%{name}2-%{version}.jar
%{_javadir}/%{short_name}.jar %{_javadir}/%{short_name}.jar
%{_javadir}/%{short_name}-%{version}.jar
%{_javadir}/hibernate_jdbc_cache.jar %{_javadir}/hibernate_jdbc_cache.jar
%ghost %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar %ghost %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar
%{_mavenpomdir}/%{name}2-%{version}.pom
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%files javadoc %files javadoc
%{_javadocdir}/%{name} %{_javadocdir}/%{name}