postgresql-jdbc/postgresql-jdbc.spec

87 lines
3.5 KiB
RPMSpec

%define MAJOR %(echo %version | cut -d. -f -2)
%define MINOR %(echo %version | cut -d. -f 3-)
%define javahome %{_jvmdir}/jdk
Name: postgresql-jdbc
Version: 42.2.18
Release: 1mamba
Summary: PostgreSQL JDBC Driver
Group: Applications/Databases
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://jdbc.postgresql.org
Source0: https://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/%{version}.jre6/postgresql-%{version}.jre6.jar
Source1: https://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/%{version}.jre7/postgresql-%{version}.jre7.jar
Source2: https://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/%{version}/postgresql-%{version}.jar
Source3: postgresql-jdpc-LICENSE
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: javapackages
%description
PostgreSQL is an advanced Object-Relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database.
%prep
%setup -q -c
cp %{SOURCE3} LICENSE
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m0755 %{SOURCE0} %{buildroot}%{_javadir}/postgresql-jdbc-%{version}.jdbc4.jar
install -D -m0755 %{SOURCE1} %{buildroot}%{_javadir}/postgresql-jdbc-%{version}.jdbc41.jar
install -D -m0755 %{SOURCE2} %{buildroot}%{_javadir}/postgresql-jdbc-%{version}.jdbc42.jar
ln -s postgresql-jdbc-%{version}.jdbc4.jar %{buildroot}%{_javadir}/postgresql-jdbc4.jar
ln -s postgresql-jdbc-%{version}.jdbc41.jar %{buildroot}%{_javadir}/postgresql-jdbc41.jar
ln -s postgresql-jdbc-%{version}.jdbc42.jar %{buildroot}%{_javadir}/postgresql-jdbc42.jar
ln -s postgresql-jdbc-%{version}.jdbc4.jar %{buildroot}%{_javadir}/postgresql-%{version}.jre6.jar
ln -s postgresql-jdbc-%{version}.jdbc41.jar %{buildroot}%{_javadir}/postgresql-%{version}.jre7.jar
ln -s postgresql-jdbc-%{version}.jdbc42.jar %{buildroot}%{_javadir}/postgresql-%{version}.jar
ln -s postgresql-%{version}.jar %{buildroot}%{_javadir}/postgresql-jdbc.jar
ln -s postgresql-%{version}.jar %{buildroot}%{_javadir}/postgresql-jdbc2.jar
ln -s postgresql-%{version}.jar %{buildroot}%{_javadir}/postgresql-jdbc2ee.jar
ln -s postgresql-%{version}.jar %{buildroot}%{_javadir}/postgresql-jdbc3.jar
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/postgresql-%{version}.jar
%{_javadir}/postgresql-%{version}.jre6.jar
%{_javadir}/postgresql-%{version}.jre7.jar
%{_javadir}/postgresql-jdbc-%{version}.jdbc4.jar
%{_javadir}/postgresql-jdbc-%{version}.jdbc41.jar
%{_javadir}/postgresql-jdbc-%{version}.jdbc42.jar
%{_javadir}/postgresql-jdbc.jar
%{_javadir}/postgresql-jdbc2.jar
%{_javadir}/postgresql-jdbc2ee.jar
%{_javadir}/postgresql-jdbc3.jar
%{_javadir}/postgresql-jdbc4.jar
%{_javadir}/postgresql-jdbc41.jar
%{_javadir}/postgresql-jdbc42.jar
%doc LICENSE
%changelog
* Sun Dec 12 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 42.2.18-1mamba
- update to 42.2.18
* Sat Mar 26 2011 gil <puntogil@libero.it> 8.4.701-3mamba
- rebuilt with java-openjdk support
* Thu Nov 04 2010 gil <puntogil@libero.it> 8.4.701-2mamba
- rebuilt devel
* Sat Sep 26 2009 gil <puntogil@libero.it> 8.4.701-1mamba
- update to 8.4.701
* Sat Apr 25 2009 gil <puntogil@libero.it> 8.3.604-1mamba
- package created by autospec