--- /dev/null
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -59,13 +59,13 @@ all: libpgcommon.a libpgcommon_srv.a
+
+ # libpgcommon is needed by some contrib
+ install: all installdirs
+- $(INSTALL_STLIB) libpgcommon.a '$(DESTDIR)$(libdir)/libpgcommon.a'
++ $(INSTALL_STLIB) libpgcommon.a '$(DESTDIR)$(pkglibdir)/libpgcommon.a'
+
+ installdirs:
+- $(MKDIR_P) '$(DESTDIR)$(libdir)'
++ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
+
+ uninstall:
+- rm -f '$(DESTDIR)$(libdir)/libpgcommon.a'
++ rm -f '$(DESTDIR)$(pkglibdir)/libpgcommon.a'
+
+ libpgcommon.a: $(OBJS_FRONTEND)
+ rm -f $@
+--- a/src/fe_utils/Makefile
++++ b/src/fe_utils/Makefile
+@@ -35,13 +35,13 @@ distprep: psqlscan.c
+
+ # libpgfeutils could be useful to contrib, so install it
+ install: all installdirs
+- $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
++ $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(pkglibdir)/libpgfeutils.a'
+
+ installdirs:
+- $(MKDIR_P) '$(DESTDIR)$(libdir)'
++ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
+
+ uninstall:
+- rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
++ rm -f '$(DESTDIR)$(pkglibdir)/libpgfeutils.a'
+
+ clean distclean:
+ rm -f libpgfeutils.a $(OBJS) lex.backup
+--- a/src/port/Makefile
++++ b/src/port/Makefile
+@@ -46,13 +46,13 @@ all: libpgport.a libpgport_srv.a
+
+ # libpgport is needed by some contrib
+ install: all installdirs
+- $(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'
++ $(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(pkglibdir)/libpgport.a'
+
+ installdirs:
+- $(MKDIR_P) '$(DESTDIR)$(libdir)'
++ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
+
+ uninstall:
+- rm -f '$(DESTDIR)$(libdir)/libpgport.a'
++ rm -f '$(DESTDIR)$(pkglibdir)/libpgport.a'
+
+ libpgport.a: $(OBJS)
+ rm -f $@
+--- a/src/Makefile.global.in
++++ b/src/Makefile.global.in
+@@ -490,7 +490,7 @@ libpq = -L$(libpq_builddir) -lpq
+ # pgport before libpq. This does cause duplicate -lpgport's to appear
+ # on client link lines.
+ ifdef PGXS
+-libpq_pgport = -L$(libdir) -lpgcommon -lpgport $(libpq)
++libpq_pgport = -L$(pkglibdir) -lpgcommon -lpgport $(libpq)
+ else
+ libpq_pgport = -L$(top_builddir)/src/common -lpgcommon -L$(top_builddir)/src/port -lpgport $(libpq)
+ endif
Patch4: postgresql-disable_horology_test.patch
Patch5: postgresql-heimdal.patch
Patch6: postgresql-link.patch
+Patch7: libpgport-pkglibdir.patch
URL: http://www.postgresql.org/
BuildRequires: autoconf >= 2.69
BuildRequires: automake
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
# force rebuild of bison/flex files
find src -name \*.l -o -name \*.y | xargs touch
update-alternatives --remove vacuumdb %{pgsqllibdir}/bin/vacuumdb || :
fi
+%post -n postgresql-devel
+update-alternatives \
+ --install %{_bindir}/pg_config pg_config %{pgsqllibdir}/bin/pg_config %{pgver}%{pgminver} \
+ --slave %{_mandir}/man1/pg_config.1 pg_config.1 %{pgsqldatadir}/man/man1/pg_config.1* || :
+
+%postun -n postgresql-devel
+ update-alternatives --remove pg_config %{pgsqllibdir}/bin/pg_config || :
+
+
%post -n postgresql-libs -p /sbin/ldconfig
%postun -n postgresql-libs -p /sbin/ldconfig
%files -n postgresql-static
%defattr(644,root,root,755)
%{_libdir}/libpq.a
-%{_libdir}/libpgcommon.a
-%{_libdir}/libpgfeutils.a
-%{_libdir}/libpgport.a
+%{pgsqllibdir}/lib/libpgcommon.a
+%{pgsqllibdir}/lib/libpgfeutils.a
+%{pgsqllibdir}/lib/libpgport.a
%files clients -f clients.lang
%defattr(644,root,root,755)