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

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