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