Blame SOURCES/libpq-10.3-rpm-pgsql.patch

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