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