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