The Release 2.0 and current versions of postgresql have a problem with the
definition of DEFAULT_PGSOCKET_DIR leaving programs like psql looking in
``/tmp'' instead of the %{l_prefix}/var/postgresql/run.  The problem is
that the header file where this is defined moved.

The attached patch for the postgresql.spec file is made against the
postgresql-7.4.2-20040427 spec file.

This patch also includes some patches I've applied locally which enable
shared libraries which are needed by other postgresql tools, and to get
pgperl built (which also requires a hack on perl to create shared
libraries).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Democracy must be sometihng more than two wolves and a sheep voting on what
to have for dinner -- James Bovard
--- postgresql.spec.orig        Tue Apr 27 02:09:41 2004
+++ postgresql.spec     Wed May  5 15:06:32 2004
@@ -41,7 +41,7 @@
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20040427
+Release:      20040505
 
 #   package options
 %option       with_cxx      no
@@ -134,7 +134,8 @@
     #   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
@@ -171,8 +172,11 @@
         --with-tclconfig="%{l_prefix}/lib" \
         --with-tkconfig="%{l_prefix}/lib" \
 %endif
+%if %{with_perl} == "yes"
+               --with-perl \
+%endif
         --disable-syslog \
-        --disable-shared
+        --enable-shared
 
     #   build package
     %{l_make} %{l_mflags}
@@ -258,6 +262,10 @@
 %endif
 
 %install
+%if "%{with_perl}" != "yes"
+    rm -rf $RPM_BUILD_ROOT
+%endif
+
     #   perform standard installation procedure
     cp /dev/null register.txt
     %{l_make} %{l_mflags} install install-all-headers DESTDIR=$RPM_BUILD_ROOT

Reply via email to