Jan Matejek 2016-09-29 12:10:46 +00:00 committed by Git OBS Bridge
parent bae8dcbe2a
commit c1f3f5ce6f

View File

@ -18,7 +18,7 @@
%define base_name dbcp
%define short_name commons-%{base_name}2
Name: jakarta-commons-dbcp
Name: apache-commons-dbcp
Version: 2.1.1
Release: 0
Summary: Jakarta Commons DataBase Pooling Package
@ -86,30 +86,20 @@ ant \
-Djunit.jar=$(build-classpath junit) \
-Dxerces.jar=$(build-classpath xerces-j2) \
-Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
-Dnaming-common.jar=$(build-classpath tomcat/catalina) \
-Dnaming-java.jar=$(build-classpath tomcat/catalina) \
-Dcommons-logging.jar=$(build-classpath commons-logging) \
-Djava.io.tmpdir=. \
-Djta-spec.jar=$(build-classpath geronimo-jta-1_1) \
-Djta-impl.jar=$(build-classpath jta-api) \
dist
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 dist/%{short_name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
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)
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE7} \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name}
# quick hack clean up
rm ../LICENSE
# hibernate_jdbc_cache ghost symlink
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
ln -sf %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar %{buildroot}%{_javadir}/hibernate_jdbc_cache.jar
@ -126,14 +116,12 @@ fi
%files
%defattr(-,root,root)
%doc LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_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}/*
%{_datadir}/maven-metadata/%{name}.xml
%files javadoc
%defattr(-,root,root)