-#
-# TODO:
-# - finish with_apidocs
-# - check BRs for gtk+3
-# - make gtk3 bcond enabled by default when gtk+3 will be stable
-# - introspection files
-# - dbus files
+# TODO
+# - finish with_apidocs
+# - qt and Qt packages make file collisions on case insensitive filesystems,
+# consider adding version suffix to either of the pckages
#
# Conditional build:
%bcond_with apidocs # build API documentation
%bcond_without dotnet # build without dotnet bindings
%bcond_without gtk # build without GTK+
-%bcond_with gtk3 # build without GTK+3
+%bcond_without gtk3 # build without GTK+3
%bcond_without pygtk # build without PyGTK
%bcond_without qt # build without (any) qt bindings
%bcond_without qt3 # build without qt3 bindings
%undefine with_qt4
%endif
+# see http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2012-October/155984.html
+%undefine _ssp_cflags
+
%{?with_dotnet:%include /usr/lib/rpm/macros.mono}
Summary: Free mDNS/DNS-SD/Zeroconf implementation
Summary(pl.UTF-8): Wolna implementacja mDNS/DNS-SD/Zeroconf
Name: avahi
-Version: 0.6.28
-Release: 5
+Version: 0.6.31
+Release: 7
License: LGPL v2.1+
Group: Applications
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: d0143a5aa3265019072e53ab497818d0
+# Source0-md5: 2f22745b8f7368ad5a0a3fddac343f2d
Source1: %{name}-daemon
Source2: %{name}-dnsconfd
Source3: %{name}.png
Patch4: nss-mdns-package.patch
Patch5: %{name}-dhclient_hooks.patch
Patch6: %{name}-autoipd-sbin_ip.patch
+Patch7: 01_%{name}-daemon.conf.patch
+Patch8: %{name}-core-reserve-space-for-record-data-when-size-estimate.patch
URL: http://avahi.org/
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.11
%if %{with gtk}
BuildRequires: glib2-devel >= 1:2.12.2
BuildRequires: gtk+2-devel >= 2:2.14.0
-BuildRequires: libglade2-devel >= 1:2.6.0
%endif
%if %{with gtk3}
-BuildRequires: glib2-devel
-BuildRequires: gtk+3-devel
-BuildRequires: libglade2-devel
+BuildRequires: glib2-devel >= 1:2.28.0
+BuildRequires: gtk+3-devel >= 3.0.0
%endif
BuildRequires: intltool >= 0.35
BuildRequires: libcap-devel
BuildRequires: qt4-build
%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.561
+BuildRequires: rpmbuild(macros) >= 1.626
Requires(post,preun): /sbin/chkconfig
+Requires(post,preun,postun): systemd-units >= 38
Requires: %{name}-libs = %{version}-%{release}
Requires: dbus >= 0.92
Requires: libdaemon >= 0.14
Requires: rc-scripts >= 0.4.3
+Requires: systemd-units >= 38
Suggests: nss_mdns >= 0.10-2
Provides: group(avahi)
Provides: user(avahi)
+Obsoletes: avahi-systemd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Group: Daemons
Requires: %{name} = %{version}-%{release}
Requires: upstart >= 0.6
+Conflicts: syslog-ng-upstart < 3.2.4-1
%description upstart
Upstart jobs description for Avahi daemons.
Summary: Avahi Bonjour compat library
Summary(pl.UTF-8): Biblioteka Avahi zgodna z Bonjour
Group: Libraries
+Requires: %{name}-libs = %{version}-%{release}
Provides: mdns-bonjour
Obsoletes: mDNSResponder-libs
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
%{__intltoolize}
%{__autoheader}
%{__automake}
%configure \
+ --disable-stack-protector \
--disable-silent-rules \
--enable-compat-libdns_sd \
--enable-compat-howl \
%{!?with_qt4:--disable-qt4} \
%{!?with_dotnet:--disable-mono} \
%{!?with_dotnet:--disable-monodoc} \
+ --with-systemdsystemunitdir=%{systemdunitdir} \
--with-avahi-priv-access-group=adm \
--with-autoipd-user=avahi \
--with-autoipd-group=avahi
pythondir=%{py_sitedir}
install -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d
-cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/init/avahi-daemon.conf
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/init/avahi-dnsconfd.conf
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/init/avahi-daemon.conf
+cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/avahi-dnsconfd.conf
ln -sf %{_includedir}/avahi-compat-libdns_sd/dns_sd.h \
$RPM_BUILD_ROOT%{_includedir}/dns_sd.h
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{avahi-{browse-domains,publish-address,publish-service,resolve-address,resolve-host-name},bvnc}.1
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/avahi-{browse-domains,publish-address,publish-service,resolve-address,resolve-host-name}.1
+%{?with_gtk:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/bvnc.1}
echo '.so avahi-browse.1' > $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1
echo '.so avahi-publish.1' > $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-address.1
echo '.so avahi-publish.1' > $RPM_BUILD_ROOT%{_mandir}/man1/avahi-publish-service.1
%service %{name}-daemon restart
/sbin/chkconfig --add %{name}-dnsconfd
%service %{name}-dnsconfd restart
+%systemd_post avahi-daemon.service avahi-dnsconfd.service avahi-daemon.socket
%preun
if [ "$1" = "0" ]; then
%service -q %{name}-daemon stop
/sbin/chkconfig --del %{name}-daemon
fi
+%systemd_preun avahi-daemon.service avahi-dnsconfd.service avahi-daemon.socket
%postun
if [ "$1" = "0" ]; then
%userremove avahi
%groupremove avahi
fi
+%systemd_reload
+
+%triggerpostun -- avahi < 0.6.30-7
+%systemd_trigger avahi-daemon.service avahi-dnsconfd.service avahi-daemon.socket
%postun autoipd
if [ "$1" = "0" ]; then
%dir %{_sysconfdir}/avahi
%dir %{_sysconfdir}/avahi/services
+%attr(755,root,root) %{_sysconfdir}/avahi/avahi-dnsconfd.action
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/avahi-daemon.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/avahi-dnsconfd.action
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/hosts
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/services/ssh.service
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/services/sftp-ssh.service
-%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/*
+%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/avahi-dbus.conf
+
+%{systemdunitdir}/avahi-daemon.service
+%{systemdunitdir}/avahi-daemon.socket
+%{systemdunitdir}/avahi-dnsconfd.service
+%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%attr(755,root,root) %{_bindir}/avahi-set-host-name
%attr(755,root,root) %{_sbindir}/avahi-dnsconfd
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/service-types.db
-#%%dir %{_datadir}/%{name}/introspection
-#%%{_datadir}/%{name}/introspection/*.introspect
%{_datadir}/%{name}/avahi-service.dtd
%{_datadir}/%{name}/service-types
%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml