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