%{?buildrhel3:%define kerbdir /usr/kerberos} %{!?kerbdir:%define kerbdir "/usr"} %{!?sname:%define sname slony1} Summary: A "master to multiple slaves" replication system with cascading and failover Name: postgresql-slony-engine Version: 2.0.2 Release: 1.1%{?dist} License: BSD Group: Applications/Databases URL: http://main.slony.info/ Source0: http://main.slony.info/downloads/2.0/source/%{sname}-%{version}.tar.bz2 Source2: filter-requires-perl-Pg.sh Patch0: %{sname}-%{version}-rpmlint.patch Patch1: %{sname}-%{version}-doc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel >= 8.3 BuildRequires: postgresql-server >= 8.3 BuildRequires: initscripts, byacc, flex BuildRequires: docbook-style-dsssl postgresql_autodoc docbook-utils Requires: postgresql-server >= 8.3 Requires: perl-DBD-Pg %description Slony-I is a "master to multiple slaves" replication system for PostgreSQL with cascading and failover. The big picture for the development of Slony-I is to build a master-slave system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of slave systems. Slony-I is a system for data centers and backup sites, where the normal mode of operation is that all nodes are available %package docs Summary: Documentation for Slony-I Group: Applications/Databases Requires: %{name} BuildRequires: libjpeg, netpbm-progs, groff, docbook-style-dsssl, ghostscript %description docs The postgresql-slony1-docs package includes some documentation for Slony-I. %define __perl_requires %{SOURCE2} %prep %setup -q -n %{sname}-%{version} %patch0 -p1 %patch1 -p1 %build find doc/ -type f -exec chmod 644 {} \; find doc/ -type d -exec chmod 755 {} \; CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS CPPFLAGS="${CPPFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CPPFLAGS CFLAGS="${CFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CFLAGS export LIBNAME=%{_lib} %configure --includedir %{_includedir}/pgsql --with-pgconfigdir=%{_bindir} --libdir=%{_libdir} \ --with-perltools=%{_bindir} --with-toolsbin=%{_bindir} \ --with-docs --with-docdir=%{_docdir}/%{name}-%{version} \ --datadir %{_datadir}/pgsql --with-pglibdir=%{_libdir}/pgsql make %{?_smp_mflags} make %{?_smp_mflags} -C tools %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir} install -d %{buildroot}%{_datadir}/pgsql/ install -d %{buildroot}%{_libdir}/pgsql/ make %{?_smp_mflags} DESTDIR=%{buildroot} install install -m 0755 src/backend/slony1_funcs.so %{buildroot}%{_libdir}/pgsql/slony1_funcs.so install -m 0644 src/backend/*.sql %{buildroot}%{_datadir}/pgsql/ install -m 0755 tools/*.sh %{buildroot}%{_bindir}/ install -m 0755 tools/*.pl %{buildroot}%{_bindir}/ install -m 0644 share/slon.conf-sample %{buildroot}%{_sysconfdir}/slon.conf /bin/chmod 644 COPYRIGHT UPGRADING SAMPLE HISTORY-1.1 RELEASE install -d %{buildroot}%{_initrddir} install -m 755 redhat/slon.init %{buildroot}%{_initrddir}/slony1 find doc/ -type f -name '.cvsignore' -exec rm -f {} \; find doc/ -type f -name '*.de' -exec rm -f {} \; find doc/ -type f -size 0 -exec rm -f {} \; cd tools make %{?_smp_mflags} DESTDIR=%{buildroot} install /bin/rm -rf altperl/*.pl altperl/ToDo altperl/README altperl/Makefile altperl/CVS /usr/bin/install -m 0644 altperl/slon_tools.conf-sample %{buildroot}%{_sysconfdir}/slon_tools.conf /usr/bin/install -m 0755 altperl/* %{buildroot}%{_bindir}/ /usr/bin/install -m 0644 altperl/slon-tools %{buildroot}%{_libdir}/pgsql/slon-tools.pm /usr/bin/install -m 0755 -d %{buildroot}%{_var}/log/slony1 /bin/rm -f %{buildroot}%{_sysconfdir}/slon_tools.conf-sample /bin/rm -f %{buildroot}%{_bindir}/slon_tools.conf-sample /bin/rm -f %{buildroot}%{_bindir}/slon-tools.pm /bin/rm -f %{buildroot}%{_bindir}/slon-tools /bin/rm -f %{buildroot}%{_bindir}/pgsql/slon-tools /bin/rm -f %{buildroot}%{_bindir}/old-apache-rotatelogs.patch # install man pages cd ../doc/adminguide/ for section in man? do pushd ${section} /usr/bin/install -m 0755 -d ${manpage} %{buildroot}%{_mandir}/${section} for manpage in * do if [ -f "${manpage}" ]; then /usr/bin/gzip ${manpage} /usr/bin/install -m 0644 ${manpage}.gz %{buildroot}%{_mandir}/${section}/ fi done popd rm -rf ${section} done %clean rm -rf %{buildroot} %post /sbin/chkconfig --add slony1 || : %preun if [ $1 = 0 ] ; then /sbin/service slony1 condstop >/dev/null 2>&1 || : /sbin/chkconfig --del slony1 || : fi %postun if [ $1 -ge 1 ]; then /sbin/service slony1 condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE %{_datadir}/pgsql/*.sql %{_libdir}/pgsql/slon-tools.pm %{_mandir}/man1/* %{_mandir}/man7/* %config(noreplace) %{_sysconfdir}/slon.conf %config(noreplace) %{_sysconfdir}/slon_tools.conf %{_bindir}/* %{_initrddir}/slony1 %{_libdir}/pgsql/slony1_funcs.so %attr(755,postgres,postgres) %{_var}/log/slony1 %files docs %defattr(-,root,root,-) %doc doc/adminguide doc/concept doc/howto doc/implementation doc/support %changelog * Tue Aug 25 2009 Rob Myers 2.0.2-1.1 - Cleanups for rpmlint for Fedora * Sat May 9 2009 Devrim Gunduz 2.0.2-1 - Update to 2.0.2 - Removed patch0 -- it is no longer needed. - Added a temp patch to get rid of sgml error. - Re-enable doc builds * Sat Mar 14 2009 Devrim Gunduz 2.0.1-1 - Update to 2.0.1 - Create log directory, per pgcore #77. * Thu Jan 29 2009 Devrim Gunduz 2.0.0-3 - Add docbook-utils to BR. * Sat Dec 13 2008 Devrim Gunduz 2.0.0-2 - Add a patch to fix build errors - Temporarily update Source2, so that it will silence a dependency error. * Tue Dec 2 2008 Devrim Gunduz 2.0.0-1 - Update to 2.0.0 * Mon Sep 22 2008 Devrim Gunduz 1.2.15-3 - Add dependency for perl-DBD-Pg, paer Xavier Bergade. * Sun Sep 21 2008 Devrim Gunduz 1.2.15-2 - Fix dependency issues caused by latest commit. * Fri Sep 12 2008 Devrim Gunduz 1.2.15-1 - Update to 1.2.15 - Install tools written in perl, too. * Fri May 16 2008 Devrim Gunduz 1.2.14-1 - Update to 1.2.14 * Wed Apr 2 2008 Devrim Gunduz 1.2.13-2 - Fix init script name. * Sun Feb 10 2008 Devrim Gunduz 1.2.13-1 - Update to 1.2.13 * Mon Dec 17 2007 Devrim Gunduz 1.2.12-2 - Add flex and byacc to buildrequires, per Michael Best * Tue Nov 13 2007 Devrim Gunduz 1.2.12-1 - Update to 1.2.12 * Wed Aug 29 2007 Devrim Gunduz 1.2.11-1 - Update to 1.2.11 - Remove the word "engine" from init script name. * Mon Aug 6 2007 Devrim Gunduz 1.2.10-2 - Fix Source0 - Spec file cleanup (removed macro for perltools) - Added initscripts as BR. - Fix doc package installation path (and ownership issue) * Wed Jun 13 2007 Devrim Gunduz 1.2.10-1 - Update to 1.2.10 * Mon Jun 11 2007 Devrim Gunduz 1.2.9-3 - Add BuildRequires for docs subpackage, per #199154 (Thanks Ruben). * Sun Jun 3 2007 Devrim Gunduz 1.2.9-2 - Some more fixes for Fedora review. - Remove executable bits from docs. * Thu May 17 2007 Devrim Gunduz - Install init script with rpm. - Fix --with-pgconfigdir parameter. - Fix rpm build problem when the system has pg_config in both under /usr/local/pgsql/bin and /usr/bin * Wed Mar 22 2007 Christopher Browne - Added more recent release notes * Wed Mar 7 2007 Christopher Browne - Added more recent release notes * Thu Jan 4 2007 Devrim Gunduz - Add docs package (It should be added before but...) * Wed Nov 8 2006 Devrim Gunduz - On 64-bit boxes, both 32 and 64 bit -devel packages may be installed. Fix version check script - Revert tar name patch - Macros cannot be used in various parts of the spec file. Revert that commit - Spec file cleanup * Tue Oct 31 2006 Trevor Astrope - Fixup tar name and install slon-tools as slon-tools.pm * Mon Jul 17 2006 Devrim Gunduz postgresql-slony1-engine - Updated spec and cleaned up rpmlint errors and warnings * Wed Dec 21 2005 Devrim Gunduz postgresql-slony1-engine - Added a buildrhel3 macro to fix RHEL 3 RPM builds - Added a kerbdir macro * Wed Dec 14 2005 Devrim Gunduz postgresql-slony1-engine - Fixed the spec file so that during upgrade, conf files will not be replaced, and a .rpmnew will be created. * Thu Nov 24 2005 Devrim Gunduz postgresql-slony1-engine - Created bindir * Wed Oct 26 2005 Devrim Gunduz postgresql-slony1-engine - Modify CPPFLAGS and CFLAGS to fix builds on RHEL -- Per Philip Yarra * Tue Oct 18 2005 Devrim Gunduz postgresql-slony1-engine - Created a new package : -docs and moved all the docs there. * Tue Oct 18 2005 Devrim Gunduz postgresql-slony1-engine - Fixed the problem in http://gborg.postgresql.org/pipermail/slony1-general/2005-October/003105.html * Sat Oct 01 2005 Devrim Gunduz postgresql-slony1-engine - Upgrade to 1.1.1 * Tue Jul 12 2005 Devrim Gunduz postgresql-slony1-engine - Added a line to check postgresql RPM version and tag SlonyI RPM with it. - Updated Requires files so that it checks correct PostgreSQL version - Moved autoconf line into correct place. * Thu Jun 08 2005 Devrim Gunduz postgresql-slony1-engine - Added UPGRADING, HISTORY-1.1, INSTALL, SAMPLE among installed files, reflecting the change in GNUMakefile.in * Thu Jun 02 2005 Devrim Gunduz postgresql-slony1-engine - Apply a new docs macro and disable building of docs by default. - Remove slon-tools.conf-sample from bindir. - Removed --bindir and --libdir, since they are not needed. * Mon Apr 10 2005 Devrim Gunduz postgresql-slony1-engine - More fixes on RPM builds * Thu Apr 07 2005 Devrim Gunduz postgresql-slony1-engine - More fixes on RPM builds * Tue Apr 04 2005 Devrim Gunduz postgresql-slony1-engine - Fix RPM build errors, regarding to tools/ . * Thu Apr 02 2005 Devrim Gunduz postgresql-slony1-engine - Added docs to installed files list. - Added perltools, so that tools/altperl may be compiled. - Updated the spec file * Thu Mar 17 2005 Devrim Gunduz postgresql-slony1-engine - Update to 1.1.0beta1 - Remove PostgreSQL source dependency * Thu Mar 17 2005 Devrim Gunduz postgresql-slony1-engine - Fix RPM builds * Thu Mar 18 2004 Daniel Berrange postgresql-slony1-engine - Initial RPM packaging