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