Kaynağa Gözat

fix socket path substitution and upgrade to the more modern world order of perl-openpkg where the build and install steps can be separated

Ralf S. Engelschall 21 yıl önce
ebeveyn
işleme
c70315711a
1 değiştirilmiş dosya ile 18 ekleme ve 9 silme
  1. 18 9
      postgresql/postgresql.spec

+ 18 - 9
postgresql/postgresql.spec

@@ -41,7 +41,7 @@ Class:        BASE
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20040427
+Release:      20040506
 
 #   package options
 %option       with_cxx      no
@@ -134,7 +134,7 @@ AutoReqProv:  no
     #   adjust source tree
     %{l_shtool} subst \
         -e 's;\(#define.*DEFAULT_PGSOCKET_DIR[^"]*"\)/tmp\("\);\1%{l_prefix}/var/postgresql/run\2;' \
-        src/include/pg_config.h.in
+        src/include/pg_config_manual.h
     %{l_shtool} subst \
         -e 's;^\(sqlmansect *=\).*$;\1 7;' \
         src/makefiles/Makefile.solaris
@@ -228,14 +228,10 @@ AutoReqProv:  no
           -e 's;-lpq;-lpq %{l_ldflags} -lssl -lcrypto -lcrypt;' \
           Makefile.PL
     ) || exit $?
-    (
-      export POSTGRES_INCLUDE=dummy
+    ( export POSTGRES_INCLUDE=dummy
       export POSTGRES_LIB=dummy
-      %{l_prefix}/bin/perl-openpkg -d Pg-%{V_pgperl} configure build install
+      %{l_prefix}/bin/perl-openpkg -d Pg-%{V_pgperl} configure build
     ) || exit $?
-    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
-%else
-    >perl-openpkg-files
 %endif
 
     #   build ODBC driver
@@ -258,6 +254,8 @@ AutoReqProv:  no
 %endif
 
 %install
+    rm -rf $RPM_BUILD_ROOT
+
     #   perform standard installation procedure
     cp /dev/null register.txt
     %{l_make} %{l_mflags} install install-all-headers DESTDIR=$RPM_BUILD_ROOT
@@ -332,7 +330,18 @@ AutoReqProv:  no
     ) || exit $?
 %endif
 
-    #   build ODBC driver
+    #   install Perl binding
+%if "%{with_perl}" == "yes"
+    ( export POSTGRES_INCLUDE=dummy
+      export POSTGRES_LIB=dummy
+      %{l_prefix}/bin/perl-openpkg -d Pg-%{V_pgperl} install
+    ) || exit $?
+    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
+%else
+    >perl-openpkg-files
+%endif
+
+    #   install ODBC driver
 %if "%{with_odbc}" == "yes"
     ( cd psqlodbc-%{V_psqlodbc}
       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"