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

ad7aa5
For the RPMs, we want the custom installation directories to end in
ad7aa5
/pgsql not /postgresql.  This is historical but not worth changing.
ad7aa5
ad7aa5
Notice that this patch also makes the appending of /pgsql unconditional.
ad7aa5
This is to avoid unexpected behavior if the RPM is built in a working
ad7aa5
directory whose path happens to include "postgres" or "pgsql" already.
ad7aa5
However, datadir and sysconfdir are already set up in the specfile's
ad7aa5
configure call, so we do not have to append anything to them.
ad7aa5
ad7aa5
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
ad7aa5
index 9a6265b3a0..c9371a07c4 100644
ad7aa5
--- a/src/Makefile.global.in
ad7aa5
+++ b/src/Makefile.global.in
ad7aa5
@@ -82,8 +82,7 @@ vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $
ad7aa5
 # Installation directories
ad7aa5
 #
ad7aa5
 # These are set by the equivalent --xxxdir configure options.  We
ad7aa5
-# append "postgresql" to some of them, if the string does not already
ad7aa5
-# contain "pgsql" or "postgres", in order to avoid directory clutter.
ad7aa5
+# append "pgsql" to some of them, in order to avoid directory clutter.
ad7aa5
 #
ad7aa5
 # In a PGXS build, we cannot use the values inserted into Makefile.global
ad7aa5
 # by configure, since the installation tree may have been relocated.
ad7aa5
@@ -101,45 +100,23 @@ datarootdir := @datarootdir@
ad7aa5
 bindir := @bindir@
ad7aa5
 
ad7aa5
 datadir := @datadir@
ad7aa5
-ifeq "$(findstring pgsql, $(datadir))" ""
ad7aa5
-ifeq "$(findstring postgres, $(datadir))" ""
ad7aa5
-override datadir := $(datadir)/postgresql
ad7aa5
-endif
ad7aa5
-endif
ad7aa5
 
ad7aa5
 sysconfdir := @sysconfdir@
ad7aa5
-ifeq "$(findstring pgsql, $(sysconfdir))" ""
ad7aa5
-ifeq "$(findstring postgres, $(sysconfdir))" ""
ad7aa5
-override sysconfdir := $(sysconfdir)/postgresql
ad7aa5
-endif
ad7aa5
-endif
ad7aa5
 
ad7aa5
 libdir := @libdir@
ad7aa5
 
ad7aa5
 pkglibdir = $(libdir)
ad7aa5
-ifeq "$(findstring pgsql, $(pkglibdir))" ""
ad7aa5
-ifeq "$(findstring postgres, $(pkglibdir))" ""
ad7aa5
-override pkglibdir := $(pkglibdir)/postgresql
ad7aa5
-endif
ad7aa5
-endif
ad7aa5
+override pkglibdir := $(pkglibdir)/pgsql
ad7aa5
 
ad7aa5
 includedir := @includedir@
ad7aa5
 
ad7aa5
 pkgincludedir = $(includedir)
ad7aa5
-ifeq "$(findstring pgsql, $(pkgincludedir))" ""
ad7aa5
-ifeq "$(findstring postgres, $(pkgincludedir))" ""
ad7aa5
-override pkgincludedir := $(pkgincludedir)/postgresql
ad7aa5
-endif
ad7aa5
-endif
ad7aa5
+override pkgincludedir := $(pkgincludedir)/pgsql
ad7aa5
 
ad7aa5
 mandir := @mandir@
ad7aa5
 
ad7aa5
 docdir := @docdir@
ad7aa5
-ifeq "$(findstring pgsql, $(docdir))" ""
ad7aa5
-ifeq "$(findstring postgres, $(docdir))" ""
ad7aa5
-override docdir := $(docdir)/postgresql
ad7aa5
-endif
ad7aa5
-endif
ad7aa5
+override docdir := $(docdir)/pgsql
ad7aa5
 
ad7aa5
 htmldir := @htmldir@
ad7aa5