|
| 1 | +# SPEC file for pg_repack |
| 2 | +# Copyright(C) 2009-2010 NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
| 3 | +%define snamepg_repack |
| 4 | + |
| 5 | +%define _pgdir /usr/pgsql-9.0 |
| 6 | +%define _bindir %{_pgdir}/bin |
| 7 | +%define _libdir %{_pgdir}/lib |
| 8 | +%define _datadir %{_pgdir}/share |
| 9 | + |
| 10 | +Summary:Reorganize tables in PostgreSQL databases without any locks. |
| 11 | +Name:%{sname} |
| 12 | +Version:1.1.5 |
| 13 | +Release:1%{?dist} |
| 14 | +License:BSD |
| 15 | +Group:Applications/Databases |
| 16 | +Source0:%{sname}-%{version}.tar.gz |
| 17 | +URL:http://pgfoundry.org/projects/%{sname}/ |
| 18 | +BuildRoot:%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) |
| 19 | + |
| 20 | +BuildRequires:postgresql90-devel, postgresql90 |
| 21 | +Requires:postgresql90, postgresql90-libs |
| 22 | + |
| 23 | +%description |
| 24 | +pg_repack can re-organize tables on a postgres database without any locks so that |
| 25 | +you can retrieve or update rows in tables being reorganized. |
| 26 | +The module is developed to be a better alternative of CLUSTER and VACUUM FULL. |
| 27 | + |
| 28 | +%prep |
| 29 | +%setup -q -n %{sname}-%{version} |
| 30 | + |
| 31 | +%build |
| 32 | +USE_PGXS=1 make %{?_smp_mflags} |
| 33 | + |
| 34 | +%install |
| 35 | +rm -rf %{buildroot} |
| 36 | +USE_PGXS=1 make DESTDIR=%{buildroot} |
| 37 | + |
| 38 | +install -d %{buildroot}%{_libdir} |
| 39 | +install -d %{buildroot}%{_bindir} |
| 40 | +install -d %{buildroot}%{_datadir}/contrib |
| 41 | + |
| 42 | +install -m 755 bin/pg_repack%{buildroot}%{_bindir}/pg_repack |
| 43 | +install -m 755 lib/pg_repack.so%{buildroot}%{_libdir}/pg_repack.so |
| 44 | +install -m 644 lib/pg_repack.sql%{buildroot}%{_datadir}/contrib/pg_repack.sql |
| 45 | +install -m 644 lib/uninstall_pg_repack.sql%{buildroot}%{_datadir}/contrib/uninstall_pg_repack.sql |
| 46 | + |
| 47 | +%define pg_sharedir |
| 48 | + |
| 49 | +%files |
| 50 | +%defattr(755,root,root,755) |
| 51 | +%{_bindir}/pg_repack |
| 52 | +%{_libdir}/pg_repack.so |
| 53 | +%defattr(644,root,root,755) |
| 54 | +%{_datadir}/contrib/pg_repack.sql |
| 55 | +%{_datadir}/contrib/uninstall_pg_repack.sql |
| 56 | + |
| 57 | +%clean |
| 58 | +rm -rf %{buildroot} |
| 59 | + |
| 60 | +%changelog |
| 61 | +*Thu Oct 21 2010- NTT OSS Center<sakamoto.masahiko@oss.ntt.co.jp>1.1.5-1 |
| 62 | +*Wed Sep 22 2010- NTT OSS Center<sakamoto.masahiko@oss.ntt.co.jp>1.1.4-1 |
| 63 | +*Thu Apr 22 2010- NTT OSS Center<itagaki.takahiro@oss.ntt.co.jp>1.1.2-1 |
| 64 | +*Mon Jan 15 2010- Toru SHIMOGAKI<shimogaki.toru@oss.ntt.co.jp>1.0.8-1 |
| 65 | +*Tue Sep 08 2009- Toru SHIMOGAKI<shimogaki.toru@oss.ntt.co.jp>1.0.6-1 |
| 66 | +*Fri May 15 2009- Toru SHIMOGAKI<shimogaki.toru@oss.ntt.co.jp>1.0.4-1 |
| 67 | +-Initial packaging |