소스 검색

modifying package: postgresql-7.4.3 20040615 -> 20040703

Ralf S. Engelschall 21 년 전
부모
커밋
4dde29eb60
1개의 변경된 파일26개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 2
      postgresql/postgresql.spec

+ 26 - 2
postgresql/postgresql.spec

@@ -26,7 +26,7 @@
 #   package versions
 #   package versions
 %define       V_postgresql      7.4.3
 %define       V_postgresql      7.4.3
 %define       V_libpqpp         4.0
 %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_pgperl          2.0.2
 %define       V_psqlodbc        07.03.0200
 %define       V_psqlodbc        07.03.0200
 
 
@@ -41,9 +41,10 @@ Class:        BASE
 Group:        Database
 Group:        Database
 License:      GPL
 License:      GPL
 Version:      %{V_postgresql}
 Version:      %{V_postgresql}
-Release:      20040615
+Release:      20040703
 
 
 #   package options
 #   package options
+%option       with_server   yes
 %option       with_cxx      no
 %option       with_cxx      no
 %option       with_perl     no
 %option       with_perl     no
 %option       with_odbc     no
 %option       with_odbc     no
@@ -355,12 +356,29 @@ AutoReqProv:  no
         %{SOURCE rc.postgresql} \
         %{SOURCE rc.postgresql} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
         $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
     #   determine installation files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+%if "%{with_server}" == "yes"
         %{l_files_std} `cat perl-openpkg-files` \
         %{l_files_std} `cat perl-openpkg-files` \
         '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/db' \
         '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/db' \
         '%attr(755,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/run' \
         '%attr(755,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/run' \
         '%config %{l_prefix}/var/postgresql/db/*.conf'
         '%config %{l_prefix}/var/postgresql/db/*.conf'
+%else
+        %{l_files_std} `cat perl-openpkg-files`
+%endif
 
 
 %files -f files
 %files -f files
 
 
@@ -368,6 +386,7 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
     rm -rf $RPM_BUILD_ROOT
 
 
 %pre
 %pre
+%if "%{with_server}" == "yes"
     #   before upgrade, check migration dump, save status and stop service
     #   before upgrade, check migration dump, save status and stop service
     [ $1 -eq 2 ] || exit 0
     [ $1 -eq 2 ] || exit 0
     if [ -f $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION -a \
     if [ -f $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION -a \
@@ -399,8 +418,10 @@ AutoReqProv:  no
     eval `%{l_rc} postgresql status 2>/dev/null | tee %{l_tmpfile}`
     eval `%{l_rc} postgresql status 2>/dev/null | tee %{l_tmpfile}`
     %{l_rc} postgresql stop 2>/dev/null
     %{l_rc} postgresql stop 2>/dev/null
     exit 0
     exit 0
+%endif
 
 
 %post
 %post
+%if "%{with_server}" == "yes"
     if [ $1 -eq 1 ]; then
     if [ $1 -eq 1 ]; then
         #   create initial database
         #   create initial database
 %if "%{with_compat}" == "yes"
 %if "%{with_compat}" == "yes"
@@ -475,11 +496,14 @@ AutoReqProv:  no
         fi
         fi
     fi
     fi
     exit 0
     exit 0
+%endif
 
 
 %preun
 %preun
+%if "%{with_server}" == "yes"
     #   before erase, stop service and remove log files
     #   before erase, stop service and remove log files
     [ $1 -eq 0 ] || exit 0
     [ $1 -eq 0 ] || exit 0
     %{l_rc} postgresql stop 2>/dev/null
     %{l_rc} postgresql stop 2>/dev/null
     rm -f $RPM_INSTALL_PREFIX/var/postgresql/run/* >/dev/null 2>&1 || true
     rm -f $RPM_INSTALL_PREFIX/var/postgresql/run/* >/dev/null 2>&1 || true
     exit 0
     exit 0
+%endif