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