Blame SOURCES/rpm-pgsql.patch

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