--- /dev/null
+--- postgresql-9.5.0/configure.in.orig 2016-01-14 18:59:41.640973653 +0100
++++ postgresql-9.5.0/configure.in 2016-01-14 21:10:21.783977990 +0100
+@@ -1192,7 +1192,9 @@
+
+ if test "$with_bonjour" = yes ; then
+ AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file <dns_sd.h> is required for Bonjour])])
++ AC_CHECK_LIB(dns_sd, DNSServiceRegister, [BONJOUR_LIBS=-ldns_sd])
+ fi
++AC_SUBST([BONJOUR_LIBS])
+
+ # for contrib/uuid-ossp
+ if test "$with_uuid" = bsd ; then
+--- postgresql-9.5.0/src/backend/Makefile.orig 2016-01-04 22:29:34.000000000 +0100
++++ postgresql-9.5.0/src/backend/Makefile 2016-01-14 21:10:48.093976872 +0100
+@@ -54,7 +54,7 @@
+ ifneq ($(PORTNAME), aix)
+
+ postgres: $(OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(call expand_subsys,$^) $(LIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(call expand_subsys,$^) $(LIBS) $(BONJOUR_LIBS) -o $@
+
+ endif
+ endif
+--- postgresql-9.5.0/src/Makefile.global.in.orig 2016-01-04 22:29:34.000000000 +0100
++++ postgresql-9.5.0/src/Makefile.global.in 2016-01-14 21:11:50.820640805 +0100
+@@ -216,6 +216,7 @@
+ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+
++BONJOUR_LIBS = @BONJOUR_LIBS@
+
+ ##########################################################################
+ #
# TODO:
# - python 3 and python 2 subpackages?
-# - consider dns_sd/Bonjour support (--with-bonjour)
-# - --enable-dtrace (is it systemtap-compatible?)
# - think about pg_upgrade integration (sysconfig variable to allow upgrade from 8.3+ without dump/restore?)
# create postgresqlM.N packages with parts of old pgsql required by pg_upgrade
# - test init script (db initialization)
%bcond_without kerberos5 # disable kerberos5 support
%bcond_without perl # disable Perl support
%bcond_without python # disable Python support
+%bcond_with bonjour # Bonjour/DNS_SD support
%bcond_without ldap # disable LDAP support
%bcond_without selinux # sepgsql contrib module
+%bcond_with systemtap # systemtap/dtrace probes
%bcond_with absolute_dbpaths # enable absolute paths to create database
# (disabled by default because it is a security risk)
#
Patch4: %{name}-disable_horology_test.patch
Patch5: %{name}-heimdal.patch
Patch6: %{name}-ossp_uuid.patch
+Patch7: %{name}-link.patch
URL: http://www.postgresql.org/
BuildRequires: autoconf
BuildRequires: automake
+%{?with_bonjour:BuildRequires: avahi-compat-libdns_sd-devel}
# not needed for releases... but fixes something in snapshot
BuildRequires: bison >= 1.875
BuildRequires: docbook-dtd42-sgml
%endif
BuildRequires: readline-devel >= 4.2
BuildRequires: rpmbuild(macros) >= 1.671
+%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
%{?with_tcl:BuildRequires: tcl-devel >= 8.4.3}
%{?with_tests:BuildRequires: tzdata}
BuildRequires: zlib-devel
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
# force rebuild of bison/flex files
find src -name \*.l -o -name \*.y | xargs touch
CFLAGS="%{rpmcflags} -DNEED_REENTRANT_FUNCS `uuid-config --cflags`" \
--disable-rpath \
--enable-depend \
+ %{?with_systemtap:--enable-dtrace} \
--enable-integer-datetimes \
- --with-system-tzdata=%{_datadir}/zoneinfo \
--enable-nls \
--enable-thread-safety \
+ %{?with_bonjour:--with-bonjour} \
%{?with_kerberos5:--with-gssapi} \
%{?with_ldap:--with-ldap} \
- --with-openssl \
- --with-pam \
--with-libxml \
--with-libxslt \
+ --with-openssl \
+ --with-pam \
%{?with_perl:--with-perl} \
%{?with_python:--with-python} \
%{?with_selinux:--with-selinux} \
+ --with-system-tzdata=%{_datadir}/zoneinfo \
%{?with_tcl:--with-tcl --with-tclconfig=%{_ulibdir}} \
--with-uuid=ossp