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