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