Blame SOURCES/rpm-pgsql.patch

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