Sync from SUSE:SLFO:Main apache-commons-pool2 revision 1794d8a8dafab33a2a193f9938c27ed7

This commit is contained in:
Adrian Schröter 2024-05-31 14:30:20 +02:00
parent 3dde3b3a93
commit 562adbbdb5
2 changed files with 19 additions and 22 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Apr 29 17:32:24 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Simplify and clean up the spec file: avoid versioned jars
-------------------------------------------------------------------
Tue Feb 20 11:06:37 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 25 17:47:40 UTC 2019 - Fridrich Strba <fstrba@suse.com> Mon Mar 25 17:47:40 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package apache-commons-pool2 # spec file for package apache-commons-pool2
# #
# 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
@ -31,7 +31,7 @@ BuildRequires: ant
BuildRequires: cglib BuildRequires: cglib
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local BuildRequires: javapackages-local >= 6
BuildRequires: junit BuildRequires: junit
Requires: cglib Requires: cglib
Provides: %{short_name} = %{version} Provides: %{short_name} = %{version}
@ -61,11 +61,8 @@ Pool 2.x Package.
%prep %prep
%setup -q -n %{short_name}-%{version}-src %setup -q -n %{short_name}-%{version}-src
# remove all binary libs # remove all binary libs
find . -name "*.jar" -exec rm -f {} \; find . -name "*.jar" -print -delete
%patch0 %patch -P 0
%pom_remove_parent .
%pom_xpath_inject "pom:project" "<groupId>org.apache.commons</groupId>" .
%build %build
echo "cglib.jar=$(build-classpath cglib)" >> build.properties echo "cglib.jar=$(build-classpath cglib)" >> build.properties
@ -76,32 +73,22 @@ ant \
%install %install
# jars # jars
install -d -m 755 %{buildroot}%{_javadir} install -d -m 755 %{buildroot}%{_javadir}
install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) ln -sf %{_javadir}/%{name}.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 755 %{buildroot}%{_mavenpomdir}
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom %{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar %add_maven_depmap %{name}.pom %{name}.jar
# javadoc # javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name} cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files %files -f .mfiles
%license LICENSE.txt %license LICENSE.txt
%doc README.txt %doc README.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{short_name}.jar %{_javadir}/%{short_name}.jar
%{_javadir}/%{short_name}-%{version}.jar
%{_mavenpomdir}/%{name}-%{version}.pom
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%files javadoc %files javadoc
%doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}