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