# TODO
-# - finish with_apidocs
-# - introspection files
-# - dbus files
+# - finish with_apidocs
# - qt and Qt packages make file collisions on case insensitive filesystems,
# consider adding version suffix to either of the pckages
#
Summary: Free mDNS/DNS-SD/Zeroconf implementation
Summary(pl.UTF-8): Wolna implementacja mDNS/DNS-SD/Zeroconf
Name: avahi
-Version: 0.6.30
+Version: 0.6.31
Release: 3
License: LGPL v2.1+
Group: Applications
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: e4db89a2a403ff4c47d66ac66fad1f43
+# Source0-md5: 2f22745b8f7368ad5a0a3fddac343f2d
Source1: %{name}-daemon
Source2: %{name}-dnsconfd
Source3: %{name}.png
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
%description upstart -l pl.UTF-8
Opis zadań Upstart dla demonów Avahi.
-%package systemd
-Summary: systemd units for avahi
-Group: Base
-Requires: %{name} = %{version}-%{release}
-
-%description systemd
-systemd units for avahi.
-
%package autoipd
Summary: IPv4LL network address configuration daemon
Summary(pl.UTF-8): Demon configurujący adresy IPv4LL
%{!?with_qt4:--disable-qt4} \
%{!?with_dotnet:--disable-mono} \
%{!?with_dotnet:--disable-monodoc} \
- --with-systemdsystemunitdir=/lib/systemd/system \
+ --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
%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
-%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%{_mandir}/man1/avahi-set-host-name.1*
%{_mandir}/man5/avahi-daemon.conf.5*
%config(noreplace) %verify(not md5 mtime size) /etc/init/*.conf
%endif
-%files systemd
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /lib/systemd/system/avahi-daemon.service
-%config(noreplace) %verify(not md5 mtime size) /lib/systemd/system/avahi-daemon.socket
-%config(noreplace) %verify(not md5 mtime size) /lib/systemd/system/avahi-dnsconfd.service
-
%files autoipd
%defattr(644,root,root,755)
%dir %{_sysconfdir}/avahi