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