Fridrich Strba 2018-12-15 14:17:47 +00:00 committed by Git OBS Bridge
parent 7f52f1ec6f
commit 7c48b0ebbf
2 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Dec 15 14:17:20 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Add maven pom file
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 15 09:30:50 UTC 2018 - fstrba@suse.com Tue May 15 09:30:50 UTC 2018 - fstrba@suse.com

View File

@ -24,7 +24,7 @@ Release: 0
Summary: Jakarta Commons DataBase Pooling Package Summary: Jakarta Commons DataBase Pooling Package
License: Apache-2.0 License: Apache-2.0
Group: Development/Libraries/Java Group: Development/Libraries/Java
Url: https://commons.apache.org/proper/commons-dbcp/ URL: https://commons.apache.org/proper/commons-dbcp/
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source100: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc Source100: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source101: commons.keyring Source101: commons.keyring
@ -32,25 +32,26 @@ Patch0: apache-commons-dbcp-sourcetarget.patch
Patch1: apache-commons-dbcp-javadoc.patch Patch1: apache-commons-dbcp-javadoc.patch
BuildRequires: ant >= 1.6.5 BuildRequires: ant >= 1.6.5
BuildRequires: apache-commons-logging BuildRequires: apache-commons-logging
BuildRequires: apache-commons-parent
BuildRequires: apache-commons-pool2 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-tools BuildRequires: javapackages-local
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: apache-commons-parent
Requires: commons-collections >= 3.2 Requires: commons-collections >= 3.2
Requires: commons-pool2 Requires: commons-pool2
Requires: jta_api >= 1.1 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}
Obsoletes: %{short_name} < %{version} Obsoletes: %{short_name} < %{version}-%{release}
Provides: hibernate_jdbc_cache Provides: hibernate_jdbc_cache
Provides: jakarta-commons-dbcp2 = %{version} Provides: jakarta-%{short_name} = %{version}-%{release}
Obsoletes: jakarta-commons-dbcp2 < %{version} Obsoletes: jakarta-%{short_name} < %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%description %description
@ -63,7 +64,7 @@ testing for valid connections, PreparedStatement pooling, and other
features. features.
%package javadoc %package javadoc
Summary: Javadoc for jakarta-commons-dbcp Summary: Javadoc for %{name}
Group: Development/Libraries/Java Group: Development/Libraries/Java
%description javadoc %description javadoc
@ -102,6 +103,11 @@ install -d -m 755 %{buildroot}%{_javadir}
install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}2-%{version}.jar 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|apache-||g"`; done)
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# 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
# javadoc # javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name} cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name}
@ -120,17 +126,21 @@ if [ $1 -eq 0 ] ; then
fi fi
%files %files
%defattr(-,root,root) %license LICENSE.txt
%doc LICENSE.txt
%{_javadir}/%{name}2.jar %{_javadir}/%{name}2.jar
%{_javadir}/%{name}2-%{version}.jar %{_javadir}/%{name}2-%{version}.jar
%{_javadir}/%{short_name}.jar %{_javadir}/%{short_name}.jar
%{_javadir}/%{short_name}-%{version}.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
%defattr(-,root,root) %{_javadocdir}/%{name}
%doc %{_javadocdir}/%{name}
%changelog %changelog