d1d6c2
For the RPMs, we want the custom installation directories to end in
d1d6c2
/pgsql not /postgresql.  This is historical but not worth changing.
d1d6c2
d1d6c2
Notice that this patch also makes the appending of /pgsql unconditional.
d1d6c2
This is to avoid unexpected behavior if the RPM is built in a working
d1d6c2
directory whose path happens to include "postgres" or "pgsql" already.
d1d6c2
However, datadir and sysconfdir are already set up in the specfile's
d1d6c2
configure call, so we do not have to append anything to them.
d1d6c2
d1d6c2
d1d6c2
diff -Naur postgresql-9.0.1.orig/src/Makefile.global.in postgresql-9.0.1/src/Makefile.global.in
d1d6c2
--- postgresql-9.0.1.orig/src/Makefile.global.in	2010-10-01 10:25:44.000000000 -0400
d1d6c2
+++ postgresql-9.0.1/src/Makefile.global.in	2010-10-11 11:52:05.224975308 -0400
d1d6c2
@@ -55,8 +55,7 @@
d1d6c2
 # Installation directories
d1d6c2
 #
d1d6c2
 # These are set by the equivalent --xxxdir configure options.  We
d1d6c2
-# append "postgresql" to some of them, if the string does not already
d1d6c2
-# contain "pgsql" or "postgres", in order to avoid directory clutter.
d1d6c2
+# append "pgsql" to some of them, in order to avoid directory clutter.
d1d6c2
 #
d1d6c2
 # In a PGXS build, we cannot use the values inserted into Makefile.global
d1d6c2
 # by configure, since the installation tree may have been relocated.
d1d6c2
@@ -74,45 +73,23 @@
d1d6c2
 bindir := @bindir@
d1d6c2
 
d1d6c2
 datadir := @datadir@
d1d6c2
-ifeq "$(findstring pgsql, $(datadir))" ""
d1d6c2
-ifeq "$(findstring postgres, $(datadir))" ""
d1d6c2
-override datadir := $(datadir)/postgresql
d1d6c2
-endif
d1d6c2
-endif
d1d6c2
 
d1d6c2
 sysconfdir := @sysconfdir@
d1d6c2
-ifeq "$(findstring pgsql, $(sysconfdir))" ""
d1d6c2
-ifeq "$(findstring postgres, $(sysconfdir))" ""
d1d6c2
-override sysconfdir := $(sysconfdir)/postgresql
d1d6c2
-endif
d1d6c2
-endif
d1d6c2
 
d1d6c2
 libdir := @libdir@
d1d6c2
 
d1d6c2
 pkglibdir = $(libdir)
d1d6c2
-ifeq "$(findstring pgsql, $(pkglibdir))" ""
d1d6c2
-ifeq "$(findstring postgres, $(pkglibdir))" ""
d1d6c2
-override pkglibdir := $(pkglibdir)/postgresql
d1d6c2
-endif
d1d6c2
-endif
d1d6c2
+override pkglibdir := $(pkglibdir)/pgsql
d1d6c2
 
d1d6c2
 includedir := @includedir@
d1d6c2
 
d1d6c2
 pkgincludedir = $(includedir)
d1d6c2
-ifeq "$(findstring pgsql, $(pkgincludedir))" ""
d1d6c2
-ifeq "$(findstring postgres, $(pkgincludedir))" ""
d1d6c2
-override pkgincludedir := $(pkgincludedir)/postgresql
d1d6c2
-endif
d1d6c2
-endif
d1d6c2
+override pkgincludedir := $(pkgincludedir)/pgsql
d1d6c2
 
d1d6c2
 mandir := @mandir@
d1d6c2
 
d1d6c2
 docdir := @docdir@
d1d6c2
-ifeq "$(findstring pgsql, $(docdir))" ""
d1d6c2
-ifeq "$(findstring postgres, $(docdir))" ""
d1d6c2
-override docdir := $(docdir)/postgresql
d1d6c2
-endif
d1d6c2
-endif
d1d6c2
+override docdir := $(docdir)/pgsql
d1d6c2
 
d1d6c2
 htmldir := @htmldir@
d1d6c2