ae7007
We should ideally provide '/bin/pg_config' in postgresql-server-devel, and
ae7007
provide no pg_config binary in libpq package.  But most of the Fedora packages
ae7007
that use pg_config actually only build against PG libraries (and
ae7007
postgresql-server-devel isn't needed).  So.., to avoid the initial rush around
ae7007
rhbz#1618698 change, rather provide pg_server_config binary, which int urn means
ae7007
that we'll have to fix only a minimal set of packages which really build
ae7007
PostgreSQL server modules.
ae7007
ae7007
diff -up postgresql-13.1/src/bin/pg_config/Makefile.patch9 postgresql-13.1/src/bin/pg_config/Makefile
ae7007
--- postgresql-13.1/src/bin/pg_config/Makefile.patch9	2020-11-18 09:28:30.885453275 +0100
ae7007
+++ postgresql-13.1/src/bin/pg_config/Makefile	2020-11-18 09:31:33.926325327 +0100
ae7007
@@ -11,6 +11,8 @@
ae7007
 PGFILEDESC = "pg_config - report configuration information"
ae7007
 PGAPPICON=win32
ae7007
 
ae7007
+PG_CONFIG = pg_server_config$(X)
ae7007
+
ae7007
 subdir = src/bin/pg_config
ae7007
 top_builddir = ../../..
ae7007
 include $(top_builddir)/src/Makefile.global
ae7007
@@ -19,22 +21,22 @@ OBJS = \
ae7007
 	$(WIN32RES) \
ae7007
 	pg_config.o
ae7007
 
ae7007
-all: pg_config
ae7007
+all: $(PG_CONFIG)
ae7007
 
ae7007
-pg_config: $(OBJS) | submake-libpgport
ae7007
-	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
ae7007
+$(PG_CONFIG): $(OBJS) | submake-libpgport
ae7007
+	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
ae7007
 
ae7007
 install: all installdirs
ae7007
-	$(INSTALL_SCRIPT) pg_config$(X) '$(DESTDIR)$(bindir)/pg_config$(X)'
ae7007
+	$(INSTALL_SCRIPT) $(PG_CONFIG) '$(DESTDIR)$(bindir)/$(PG_CONFIG)'
ae7007
 
ae7007
 installdirs:
ae7007
 	$(MKDIR_P) '$(DESTDIR)$(bindir)'
ae7007
 
ae7007
 uninstall:
ae7007
-	rm -f '$(DESTDIR)$(bindir)/pg_config$(X)'
ae7007
+	rm -f '$(DESTDIR)$(bindir)/$(PG_CONFIG)'
ae7007
 
ae7007
 clean distclean maintainer-clean:
ae7007
-	rm -f pg_config$(X) $(OBJS)
ae7007
+	rm -f $(PG_CONFIG) $(OBJS)
ae7007
 	rm -rf tmp_check
ae7007
 
ae7007
 check:
ae7007
diff -up postgresql-13.1/src/bin/pg_config/nls.mk.patch9 postgresql-13.1/src/bin/pg_config/nls.mk
ae7007
--- postgresql-13.1/src/bin/pg_config/nls.mk.patch9	2020-11-18 09:28:30.885453275 +0100
ae7007
+++ postgresql-13.1/src/bin/pg_config/nls.mk	2020-11-18 09:32:00.735599526 +0100
ae7007
@@ -1,4 +1,4 @@
ae7007
 # src/bin/pg_config/nls.mk
ae7007
-CATALOG_NAME     = pg_config
ae7007
+CATALOG_NAME     = pg_server_config
ae7007
 AVAIL_LANGUAGES  = cs de es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
ae7007
 GETTEXT_FILES    = pg_config.c ../../common/config_info.c ../../common/exec.c