apache-commons-dbcp/apache-commons-dbcp.spec

118 lines
3.6 KiB
RPMSpec

%define target_dir target
Name: apache-commons-dbcp
Version: 2.9.0
Release: 1mamba
Summary: Apache Commons DBCP (Commons Database Connection Pooling)
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://commons.apache.org/proper/commons-dbcp/
Source0: https://downloads.apache.org/commons/dbcp/source/commons-dbcp2-%{version}-src.tar.gz
Source1: maven2-2.2.0-settings.xml
Source2: apache-commons-dbcp-1.4-autogeneratedfiles.tar.gz
Patch0: apache-commons-dbcp-1.3-build_xml.patch
License: Apache Software License Version 2.0
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: apache-commons-pool
Requires: jakarta-commons-collections
%description
The DBCP package shall create and maintain a database connection pool package written in the Java language to be distributed under the ASF license. The package shall be available as a pseudo-JDBC driver and via a DataSource interface. The package shall also support multiple logins to multiple database systems, reclamation of stale or dead connections, testing for valid connections, PreparedStatement pooling, and other features.
%package manual
Group: Documentation
Summary: Documents for %{name}
%description manual
Apache Commons DBCP (Database Connection Pools) Package.
This package contains documents for %{name}.
%prep
%setup -q -n commons-dbcp2-%{version}-src
#-D -T
%build
#:<< _EOF
mvn -Drat.ignoreErrors=true clean package
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}/dbcp2
install -p -m 644 %target_dir/commons-dbcp2-%{version}.jar \
%{buildroot}%{_javadir}/dbcp2/apache-commons-dbcp2-%{version}.jar
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.dbcp-commons-pool.pom
# %add_to_maven_depmap org.apache.commons commons-dbcp %{version} JPP/dbcp commons-pool
#% add_to_maven_depmap commons-dbcp commons-dbcp %{version} JPP/dbcp commons-pool
(
cd %{buildroot}%{_javadir}/dbcp2
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
done
)
(
cd %{buildroot}%{_javadir}/dbcp2
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root)
%dir %{_javadir}/dbcp2
%{_javadir}/dbcp2/apache-commons-dbcp2-%{version}.jar
%{_javadir}/dbcp2/apache-commons-dbcp2.jar
%{_javadir}/dbcp2/commons-dbcp2-%{version}.jar
%{_javadir}/dbcp2/commons-dbcp2.jar
%{_datadir}/maven2/poms
%doc LICENSE.txt
%files manual
%defattr(-,root,root)
%doc doc
%doc NOTICE.txt README.txt
%changelog
* Fri Aug 26 2022 Automatic Build System <autodist@mambasoft.it> 2.9.0-1mamba
- automatic version update by autodist
* Mon Jun 07 2021 Automatic Build System <autodist@mambasoft.it> 2.8.0-1mamba
- automatic version update by autodist
* Mon Feb 28 2011 gil <puntogil@libero.it> 1.4-1mamba
- update to 1.4
* Mon Feb 28 2011 gil <puntogil@libero.it> 1.3-4mamba
- add OSGi Manifest and maven 2 pom
- rebuilt with java-gcj-compat and new apache-commons-pool support
* Wed Nov 10 2010 gil <puntogil@libero.it> 1.3-3mamba
- rebuilt devel
* Mon Jun 15 2009 gil <puntogil@libero.it> 1.3-2mamba
- rebuilt sun-java 6u20
* Thu Jun 11 2009 gil <puntogil@libero.it> 1.3-1mamba
- update to 1.3
- renamed to legacy apache-commons-dbcp (ex jakarta)
* Sun Mar 08 2009 gil <puntogil@libero.it> 1.2.2-1mamba
- package created by autospec