|
| 1 | +# SPEC file for dblink_plus |
| 2 | +# Copyright(C) 2019 NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
| 3 | + |
| 4 | +%define _pgdir /usr/pgsql-10 |
| 5 | +%define _bindir %{_pgdir}/bin |
| 6 | +%define _libdir %{_pgdir}/lib |
| 7 | +%define _datadir %{_pgdir}/share/extension |
| 8 | + |
| 9 | +## Set general information |
| 10 | +Summary: PostgreSQL module to connect PostgreSQL/Oracle |
| 11 | +Name: dblink_plus |
| 12 | +Version: 1.0.3 |
| 13 | +Release: 1%{?dist} |
| 14 | +License: BSD |
| 15 | +Group: Applications/Databases |
| 16 | +Source0: %{name}-%{version}.tar.gz |
| 17 | +URL: https://github.com/ossc-db/dblink_plus |
| 18 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) |
| 19 | +Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
| 20 | +#Following is needed to remove auto-discovery of oci library files(not under RPM package management) |
| 21 | +AutoReqProv: no |
| 22 | + |
| 23 | +## We use postgresql-devel package |
| 24 | +BuildRequires: postgresql10-devel |
| 25 | +Requires: postgresql10-libs |
| 26 | + |
| 27 | +## Description |
| 28 | +%description |
| 29 | +dblink_plus is a PostgreSQL module which supports connections to other databases. |
| 30 | +It is similar to contrib/dblink except that it can connect to Oracle, MySQL and sqlite3. |
| 31 | + |
| 32 | +## prework |
| 33 | +%prep |
| 34 | +%setup -q -n %{name}-%{version} |
| 35 | + |
| 36 | +## Set variables for build environment |
| 37 | +%build |
| 38 | +USE_PGXS=1 make %{?_smp_mflags} MYSQL=0 SQLITE3=0 ORACLE=1 |
| 39 | + |
| 40 | +## Set variables for install |
| 41 | +%install |
| 42 | +rm -rf %{buildroot} |
| 43 | + |
| 44 | +install -d %{buildroot}%{_libdir} |
| 45 | +install -m 755 dblink_plus.so %{buildroot}%{_libdir}/dblink_plus.so |
| 46 | +install -d %{buildroot}%{_datadir} |
| 47 | +install -m 755 dblink_plus.sql %{buildroot}%{_datadir}/dblink_plus.sql |
| 48 | +install -m 755 dblink_plus--1.0.3.sql %{buildroot}%{_datadir}/dblink_plus--1.0.3.sql |
| 49 | +install -m 755 dblink_plus.control %{buildroot}%{_datadir}/dblink_plus.control |
| 50 | +install -m 755 uninstall_dblink_plus.sql %{buildroot}%{_datadir}/uninstall_dblink_plus.sql |
| 51 | +install -m 755 COPYRIGHT %{buildroot}%{_datadir}/COPYRIGHT_dblink_plus |
| 52 | + |
| 53 | + |
| 54 | +%clean |
| 55 | +rm -rf %{buildroot} |
| 56 | + |
| 57 | +%files |
| 58 | +%defattr(755,root,root) |
| 59 | +%{_libdir}/dblink_plus.so |
| 60 | +%{_datadir}/dblink_plus.sql |
| 61 | +%{_datadir}/dblink_plus--1.0.3.sql |
| 62 | +%{_datadir}/dblink_plus.control |
| 63 | +%{_datadir}/uninstall_dblink_plus.sql |
| 64 | +%{_datadir}/COPYRIGHT_dblink_plus |
| 65 | + |
| 66 | +# History. |
| 67 | +%changelog |
| 68 | +* Thu Jan 10 2019 - NTT OSS Center <tatsuro.yamada@lab.ntt.co.jp> 1.0.3-1 |
| 69 | +initial packaging |
0 commit comments