-#
-# TODO:
+# 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
+# - 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
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.30
+Release: 6
License: LGPL v2.1+
Group: Applications
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: d0143a5aa3265019072e53ab497818d0
+# Source0-md5: e4db89a2a403ff4c47d66ac66fad1f43
Source1: %{name}-daemon
Source2: %{name}-dnsconfd
Source3: %{name}.png
%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: %{name}-libs = %{version}-%{release}
Requires: dbus >= 0.92
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.
%description upstart -l pl.UTF-8
Opis zadań Upstart dla demonów Avahi.
+%package systemd
+Summary: systemd units for Avahi daemons
+Summary(pl.UTF-8): Pliki systemd dla demonów Avahi
+Group: Daemons
+Requires: %{name} = %{version}-%{release}
+Requires: systemd-units >= 37-0.10
+
+%description systemd
+systemd units for Avahi daemons.
+
+%description systemd -l pl.UTF-8
+Pliki systemd dla demonów 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=%{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
%upstart_postun avahi-daemon
%upstart_postun avahi-dnsconfd
+%post systemd
+%systemd_post avahi-daemon.service avahi-dnsconfd.service avahi-daemon.socket
+
+%preun systemd
+%systemd_preun avahi-daemon.service avahi-dnsconfd.service avahi-daemon.socket
+
+%postun systemd
+%systemd_reload
+
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%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/init/*.conf
%endif
+%files systemd
+%defattr(644,root,root,755)
+%{systemdunitdir}/avahi-daemon.service
+%{systemdunitdir}/avahi-daemon.socket
+%{systemdunitdir}/avahi-dnsconfd.service
+%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
+
%files autoipd
%defattr(644,root,root,755)
%dir %{_sysconfdir}/avahi