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: 03-Jul-2004 09:07:12 Branch: OPENPKG_2_1_SOLID Handle: 2004070308071100 Modified files: (Branch: OPENPKG_2_1_SOLID) openpkg-src/postgresql postgresql.spec Log: MFC: latest changes from CURRENT Summary: Revision Changes Path 1.97.2.2 +25 -1 openpkg-src/postgresql/postgresql.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/postgresql/postgresql.spec ============================================================================ $ cvs diff -u -r1.97.2.1 -r1.97.2.2 postgresql.spec --- openpkg-src/postgresql/postgresql.spec 2 Jul 2004 15:27:22 -0000 1.97.2.1 +++ openpkg-src/postgresql/postgresql.spec 3 Jul 2004 07:07:11 -0000 1.97.2.2 @@ -26,7 +26,7 @@ # package versions %define V_postgresql 7.4.3 %define V_libpqpp 4.0 -%define V_libpqxx 2.2.3 +%define V_libpqxx 2.2.7 %define V_pgperl 2.0.2 %define V_psqlodbc 07.03.0200 @@ -44,6 +44,7 @@ Release: 2.1.0 # package options +%option with_server yes %option with_cxx no %option with_perl no %option with_odbc no @@ -355,12 +356,29 @@ %{SOURCE rc.postgresql} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + # optionally strip down to client-only installation +%if "%{with_server}" != "yes" + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pg_* + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/post* + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/pg_* + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/post* + rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d + rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/postgresql/server + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/postgresql + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/postgresql + rm -rf $RPM_BUILD_ROOT%{l_prefix}/var/postgresql +%endif + # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ +%if "%{with_server}" == "yes" %{l_files_std} `cat perl-openpkg-files` \ '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/db' \ '%attr(755,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/run' \ '%config %{l_prefix}/var/postgresql/db/*.conf' +%else + %{l_files_std} `cat perl-openpkg-files` +%endif %files -f files @@ -368,6 +386,7 @@ rm -rf $RPM_BUILD_ROOT %pre +%if "%{with_server}" == "yes" # before upgrade, check migration dump, save status and stop service [ $1 -eq 2 ] || exit 0 if [ -f $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION -a \ @@ -399,8 +418,10 @@ eval `%{l_rc} postgresql status 2>/dev/null | tee %{l_tmpfile}` %{l_rc} postgresql stop 2>/dev/null exit 0 +%endif %post +%if "%{with_server}" == "yes" if [ $1 -eq 1 ]; then # create initial database %if "%{with_compat}" == "yes" @@ -475,11 +496,14 @@ fi fi exit 0 +%endif %preun +%if "%{with_server}" == "yes" # before erase, stop service and remove log files [ $1 -eq 0 ] || exit 0 %{l_rc} postgresql stop 2>/dev/null rm -f $RPM_INSTALL_PREFIX/var/postgresql/run/* >/dev/null 2>&1 || true exit 0 +%endif @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]