OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 11-Aug-2004 11:12:05 Branch: HEAD Handle: 2004081110120500 Modified files: openpkg-src/postgresql postgresql.spec Log: add optional Slony-I replication service Summary: Revision Changes Path 1.99 +48 -3 openpkg-src/postgresql/postgresql.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/postgresql/postgresql.spec ============================================================================ $ cvs diff -u -r1.98 -r1.99 postgresql.spec --- openpkg-src/postgresql/postgresql.spec 3 Jul 2004 07:05:29 -0000 1.98 +++ openpkg-src/postgresql/postgresql.spec 11 Aug 2004 09:12:05 -0000 1.99 @@ -29,6 +29,7 @@ %define V_libpqxx 2.2.7 %define V_pgperl 2.0.2 %define V_psqlodbc 07.03.0200 +%define V_slony1 1.0.1 # package information Name: postgresql @@ -41,7 +42,7 @@ Group: Database License: GPL Version: %{V_postgresql} -Release: 20040703 +Release: 20040811 # package options %option with_server yes @@ -50,6 +51,7 @@ %option with_odbc no %option with_compat no %option with_tcl no +%option with_slony1 no # list of sources Source0: ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.bz2 @@ -57,8 +59,9 @@ Source2: ftp://gborg.postgresql.org/pub/libpqxx/stable/libpqxx-%{V_libpqxx}.tar.gz Source3: ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz Source4: ftp://ftp.us.postgresql.org/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz -Source5: rc.postgresql -Source6: pg_migrate +Source5: http://developer.postgresql.org/~wieck/slony1/download/slony1-%{V_slony1}.tar.gz +Source6: rc.postgresql +Source7: pg_migrate Patch0: postgresql.patch # build information @@ -117,6 +120,11 @@ url = ftp://ftp.postgresql.org/pub/odbc/versions/src/ regex = psqlodbc-(\d{2}\.\d{2}\.\d{4})\.tar\.gz } + prog postgresql:slony1 = { + version = %{V_slony1} + url = http://developer.postgresql.org/~wieck/slony1/download/ + regex = slony1-(__VER__)\.tar\.gz + } %prep %setup -q @@ -131,6 +139,9 @@ %if "%{with_odbc}" == "yes" %setup -q -T -D -a 4 %endif +%if "%{with_slony1}" == "yes" + %setup -q -T -D -a 5 +%endif # adjust source tree %{l_shtool} subst \ @@ -151,7 +162,11 @@ # configure package CC="%{l_cc}" \ +%if "%{with_slony1}" == "yes" + CFLAGS="%{l_cflags -O} -pthread" \ +%else CFLAGS="%{l_cflags -O}" \ +%endif %if "%{with_tcl}" == "yes" CPPFLAGS="%{l_cppflags tcl} -DOPENSSL_DISABLE_OLD_DES_SUPPORT" \ LDFLAGS="%{l_ldflags} -L`%{l_prefix}/etc/rc --query x11_libdir`" \ @@ -172,6 +187,9 @@ --with-tclconfig="%{l_prefix}/lib" \ --with-tkconfig="%{l_prefix}/lib" \ %endif +%if "%{with_slony1}" == "yes" + --enable-thread-safety \ +%endif --disable-syslog \ --disable-shared @@ -254,6 +272,22 @@ ) || exit $? %endif + # build Slony-1 replication engine +%if "%{with_slony1}" == "yes" + ( cd slony1-%{V_slony1} + %{l_shtool} subst \ + -e 's;-lpq;-lpq -lssl -lcrypto -lcrypt;' \ + src/slon/Makefile src/slonik/Makefile + export CC="%{l_cc}" + export CFLAGS="%{l_cflags -O}" + export CPPFLAGS="%{l_cppflags}" + ./configure \ + --prefix=%{l_prefix} \ + --with-pgsourcetree=`pwd`/.. + %{l_make} %{l_mflags -O} + ) || exit $? +%endif + %install rm -rf $RPM_BUILD_ROOT @@ -349,6 +383,17 @@ ) || exit $? %endif + # install Slony-1 replication engine +%if "%{with_slony1}" == "yes" + ( cd slony1-%{V_slony1} + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + rm -f $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/slony1*v7[34].sql + rm -f $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/xxid.v73.sql + mv $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/xxid.v74.sql \ + $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/xxid.sql + ) || exit $? +%endif + # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]