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