pgpool2.git / summary / log / commit / refs
commit bede783a9847203178460d910fc66d497cc00413
Author: Devrim GÜNDÜZ <devrim at gunduz.org>
Date: Tue Feb 20 19:38:08 2007 +0000
Fixes from Jarod Wilson <jwilson@redhat.com>
- Create proper devel package, drop -libs package
- Nuke rpath
- Don't install libtool archive and static lib
- Clean up %%configure line
- Use proper %%_smp_mflags
- Install config files properly, without .sample on the end
- Preserve timestamps on header files
pgpool.spec | 74 ++++++++++++++++++++++++++-----------------------------------
1 file changed, 31 insertions(+), 43 deletions(-)
diff --git a/pgpool.spec b/pgpool.spec
index b043b1f59..6f7d37e01 100644
--- a/pgpool.spec
+++ b/pgpool.spec
@@ -3,13 +3,12 @@
Summary: Pgpool is a connection pooling/replication server for PostgreSQL
Name: postgresql-%{short_name}
Version: 1.0.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD
Group: Applications/Databases
URL: http://pgpool.projects.PostgreSQL.org/pgpool-II/en
Source0: http://pgfoundry.org/frs/download.php/1258/%{short_name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: %{name}-libs = %{version}
%description
pgpool-II is a inherited project of pgpool (to classify from
@@ -29,55 +28,41 @@ be started as pgpool-I by changing configuration parameters.
pgpool-II that is executed in pgpool-I mode enables multiple
DB nodes to be connected, which was not possible in pgpool-I.
-%package libs
-Summary: The libraries for pgpool-II
-Group: Development/Libraries
-
-%description libs
-The pgpool-II-libs package provides the essential shared libraries for pgpool
-program or its interface. You will need to install this package
-to use pgpool-II .
-
%package devel
-Summary: The development headers for pgpool-II
+Summary: The development files for pgpool-II
Group: Development/Libraries
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
%description devel
-The pgpool-II-devel package provides the essential development headers for
-pgpool program or its interface.
+Development headers and libraries for pgpool-II.
%prep
%setup -q -n %{short_name}-%{version}
+# upstream ought to make configure respect --disable-rpath
+# but this works for now
+sed -i 's|-Wl,-rpath,@PGSQL_LIB_DIR@||g' Makefile.in
%build
-CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
-CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
+%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql-lib=%{_libdir}/pgsql
-%configure
-
-make %{?smp_flags}
+make %{?_smp_flags}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
-install -d %{buildroot}%{_includedir}/
-install -d %{buildroot}/%{_datadir}/%{name}
-install -m 644 pgpool.conf.sample %{buildroot}%{_sysconfdir}/
+mv %{buildroot}%{_sysconfdir}/pgpool.conf.sample %{buildroot}%{_sysconfdir}/pgpool.conf
+mv %{buildroot}%{_sysconfdir}/pcp.conf.sample %{buildroot}%{_sysconfdir}/pcp.conf
install -m 644 pgpool.8 %{buildroot}%{_mandir}/man8/
-install -m 644 pcp/pcp.h %{buildroot}%{_includedir}/
-install -m 644 pool_type.h %{buildroot}%{_includedir}/
-install -m 644 pcp/.libs/libpcp.a %{buildroot}%{_libdir}/
-install -m 644 pcp/.libs/libpcp.la %{buildroot}%{_libdir}/
-install -m 644 sql/system_db.sql %{buildroot}/%{_datadir}/%{name}/system_db.sql
-rm -f %{buildroot}/%{_datadir}/system_db.sql
+install -m 644 -p pcp/pcp.h %{buildroot}%{_includedir}/
+install -m 755 pcp/.libs/libpcp.so.0.* %{buildroot}%{_libdir}/
+cp -a pcp/.libs/libpcp.so.0 %{buildroot}%{_libdir}/
+install -m 644 -p pool_type.h %{buildroot}%{_includedir}/
+# nuke libtool archive and static lib
+rm -f %{buildroot}%{_libdir}/libpcp.{a,la}
%clean
rm -rf %{buildroot}
-%post libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@@ -95,26 +80,29 @@ rm -rf %{buildroot}
%{_bindir}/pcp_systemdb_info
%{_bindir}/pg_md5
%{_mandir}/man8/*
-%{_datadir}/%{name}/system_db.sql
-%config(noreplace) %{_sysconfdir}/pgpool.conf.sample
-%config(noreplace) %{_sysconfdir}/pcp.conf.sample
-
-%files libs
-%defattr(-,root,root)
-%{_libdir}/libpcp.la
+%{_datadir}/system_db.sql
%{_libdir}/libpcp.so.*
+%config(noreplace) %{_sysconfdir}/pgpool.conf
+%config(noreplace) %{_sysconfdir}/pcp.conf
%files devel
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%{_includedir}/pcp.h
-%{_libdir}/libpcp.so
-%{_libdir}/libpcp.a
%{_includedir}/pool_type.h
+%{_libdir}/libpcp.so
%changelog
+* Tue Feb 20 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-2
+- Create proper devel package, drop -libs package
+- Nuke rpath
+- Don't install libtool archive and static lib
+- Clean up %%configure line
+- Use proper %%_smp_mflags
+- Install config files properly, without .sample on the end
+- Preserve timestamps on header files
+
* Tue Feb 20 2007 Devrim Gunduz <devrim@commandprompt.com> 1.0.2-1
- Update to 1.0.2-1
-- Fix various build problems and prepared for Fedora Submission
* Mon Oct 02 2006 Devrim Gunduz <devrim@commandprompt.com> 1.0.1-5
- Rebuilt
[parent: 5cdeffd83f46]