From bf5fa2ab650a6a149d34fa547dfc380f312a88cde3b360dc2b37f54dab4632e0 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 30 Apr 2024 10:55:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-dbcp?expand=0&rev=30 --- apache-commons-dbcp.changes | 5 +++++ apache-commons-dbcp.spec | 28 ++++++++-------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/apache-commons-dbcp.changes b/apache-commons-dbcp.changes index a6b6431..4b6b06f 100644 --- a/apache-commons-dbcp.changes +++ b/apache-commons-dbcp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 30 10:54:53 UTC 2024 - Fridrich Strba + +- Simplify spec: remove old macros and avoid versioned jars + ------------------------------------------------------------------- Tue Feb 20 11:04:20 UTC 2024 - Dominique Leuenberger diff --git a/apache-commons-dbcp.spec b/apache-commons-dbcp.spec index 11af4d2..c11a86a 100644 --- a/apache-commons-dbcp.spec +++ b/apache-commons-dbcp.spec @@ -36,7 +36,7 @@ BuildRequires: apache-commons-pool2 BuildRequires: fdupes BuildRequires: geronimo-jta-1_1-api BuildRequires: java-devel >= 1.7 -BuildRequires: javapackages-local +BuildRequires: javapackages-local >= 6 BuildRequires: jdbc-stdext >= 2.0 BuildRequires: junit >= 3.8.1 BuildRequires: xerces-j2 @@ -82,8 +82,6 @@ features. # remove all binary libs find . -name "*.jar" -exec rm -f {} \; -%pom_remove_parent . - %build ant \ -Dcommons-pool.jar=$(build-classpath commons-pool2) \ @@ -98,14 +96,13 @@ ant \ %install # jars -install -d -m 755 %{buildroot}%{_javadir} -install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}2-%{version}.jar -(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) -(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +install -d -m 0755 %{buildroot}%{_javadir} +install -m 0644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}2.jar +ln -sf %{_javadir}/%{name}2.jar %{buildroot}%{_javadir}/%{short_name}.jar # pom -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}2-%{version}.pom -%add_maven_depmap %{name}2-%{version}.pom %{name}2-%{version}.jar +install -d -m 0755 %{buildroot}%{_mavenpomdir} +%mvn_install_pom pom.xml %{buildroot}%{_mavenpomdir}/%{name}2.pom +%add_maven_depmap %{name}2.pom %{name}2.jar # javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{name} @@ -124,20 +121,11 @@ if [ $1 -eq 0 ] ; then update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}2.jar fi -%files +%files -f .mfiles %license LICENSE.txt -%{_javadir}/%{name}2.jar -%{_javadir}/%{name}2-%{version}.jar %{_javadir}/%{short_name}.jar -%{_javadir}/%{short_name}-%{version}.jar %{_javadir}/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 %{_javadocdir}/%{name}