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