#
-# TODO:
-# - autoip subpackage ?
-# - autoip start script ?
-#
# Conditional build:
%bcond_without dotnet # build without dotnet bindings
%bcond_without qt # build without (any) qt bindings
%bcond_without qt3 # build without qt3 bindings
%bcond_without qt4 # build without qt4 bindings
-#
-%fnarch %{ix86} %{x8664} alpha arm hppa ia64 mips ppc s390 s390x sparc sparcv9
-%undefine with_mono
+
+%ifnarch %{ix86} %{x8664} alpha arm hppa ia64 mips ppc s390 s390x sparc sparcv9
+%undefine with_dotnet
%endif
%ifarch i386
-%undefine with_mono
+%undefine with_dotnet
%endif
-%if !%{with qt}
+%if %{without qt}
%undefine with_qt3
%undefine with_qt4
%endif
+
%{?with_dotnet:%include /usr/lib/rpm/macros.mono}
-#
-Summary: Free mDNS/DNS-SD implementation
-Summary(pl.UTF-8): Wolna implementacja mDNS/DNS-SD
+Summary: Free mDNS/DNS-SD/Zeroconf implementation
+Summary(pl.UTF-8): Wolna implementacja mDNS/DNS-SD/Zeroconf
Name: avahi
-Version: 0.6.22
-Release: 2
+Version: 0.6.25
+Release: 5
License: LGPL v2.1+
Group: Applications
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: c84b1a8a23126e188426728710414dc8
+# Source0-md5: a83155a6e29e3988f07e5eea3287b21e
Source1: %{name}-daemon
Source2: %{name}-dnsconfd
Source3: %{name}.png
Patch1: %{name}-glade.patch
Patch2: %{name}-destdir.patch
Patch3: %{name}-mono-dir.patch
+Patch4: nss-mdns-package.patch
URL: http://avahi.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: expat-devel
BuildRequires: gdbm-devel
+BuildRequires: gettext-devel
BuildRequires: glib2-devel >= 1:2.12.2
BuildRequires: graphviz
BuildRequires: gtk+2-devel >= 2:2.10.2
+BuildRequires: intltool >= 0.35
BuildRequires: libcap-devel
BuildRequires: libdaemon-devel >= 0.11
BuildRequires: libglade2-devel >= 1:2.6.0
%if %{with dotnet}
BuildRequires: dotnet-gtk-sharp2-devel >= 2.10
BuildRequires: mono-csharp
-BuildRequires: monodoc
+BuildRequires: monodoc >= 2.6
%endif
BuildRequires: pkgconfig
BuildRequires: python >= 1:2.4
BuildRequires: QtCore-devel
BuildRequires: qt4-build
%endif
+BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.228
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-libs = %{version}-%{release}
Multicast DNS dla Zeroconf Computing. Używa D-BUSa dla komunikacji
pomiędzy programami użytkownika a demonem systemowym.
+%package autoipd
+Summary: IPv4LL network address configuration daemon
+Summary(pl.UTF-8): Demon configurujący adresy IPv4LL
+Group: Networking/Daemons
+Provides: group(avahi)
+Provides: user(avahi)
+
+%description autoipd
+avahi-autoipd implements IPv4LL, "Dynamic Configuration of IPv4 Link- Local
+Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
+from the link-local 169.254.0.0/16 range without the need for a central server.
+It is primarily intended to be used in ad-hoc networks which lack a DHCP
+server.
+
+IPv4LL is part of the Zeroconf stack.
+
+%description autoipd -l pl.UTF-8
+avahi-autoipd jest implementacją IPv4LL, protokołu umożliwiającego
+automatyczną konfigurację adresu z zakresu 169.254.0.0/16 bez potrzeby
+użycia centralnego serwera. Jego głównym zastosowaniem są sieci ad-hoc,
+w których brakuje serwera DHCP.
+
+IPv4LL jest częścią stosu Zeroconf.
+
%package libs
Summary: Avahi client, common and core libraries
Summary(pl.UTF-8): Biblioteki Avahi: klienta, wspólna i główna
Summary: Header files for Avahi Qt 4 library bindings
Summary(pl.UTF-8): Pliki nagłówkowe wiązań Avahi dla biblioteki Qt 4
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-Qt = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
%description Qt-devel
Header files for Avahi Qt 4 library bindings.
Summary(pl.UTF-8): Pliki rozwojowe wiązań Avahi dla MONO
Group: Development/Libraries
Requires: dotnet-avahi = %{version}-%{release}
-Requires: monodoc
+Requires: monodoc >= 2.6
%description -n dotnet-avahi-devel
Development files for MONO Avahi bindings.
Summary(pl.UTF-8): Pliki rozwojowe wiązań Avahi UI dla MONO
Group: X11/Development/Libraries
Requires: dotnet-avahi-ui = %{version}-%{release}
-Requires: monodoc
+Requires: monodoc >= 2.6
%description -n dotnet-avahi-ui-devel
Development files for MONO Avahi UI bindings.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
+%{__intltoolize}
%{__libtoolize}
%{__aclocal} -I common
%{__autoconf}
%{!?with_qt3:--disable-qt3} \
%{!?with_qt4:--disable-qt4} \
%{!?with_dotnet:--disable-mono} \
- %{!?with_dotnet:--disable-monodoc}
+ %{!?with_dotnet:--disable-monodoc} \
+ --with-avahi-priv-access-group=adm \
+ --with-autoipd-user=avahi \
+ --with-autoipd-group=avahi
%{__make}
%install
DESTDIR=$RPM_BUILD_ROOT \
pythondir=%{py_sitedir}
-install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d
-install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
+install -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d
+cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
ln -sf %{_includedir}/avahi-compat-libdns_sd/dns_sd.h \
$RPM_BUILD_ROOT%{_includedir}/dns_sd.h
%groupadd -g 165 -r -f avahi
%useradd -u 165 -r -d /usr/share/empty -s /bin/false -c "Avahi daemon" -g avahi avahi
+%pre autoipd
+%groupadd -g 165 -r -f avahi
+%useradd -u 165 -r -d /usr/share/empty -s /bin/false -c "Avahi daemon" -g avahi avahi
+
%post
/sbin/chkconfig --add %{name}-daemon
%service %{name}-daemon restart
%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) %{_sysconfdir}/dbus-1/system.d/*
+%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/*
%attr(755,root,root) %{_bindir}/avahi-set-host-name
%attr(754,root,root) /etc/rc.d/init.d/%{name}-daemon
%attr(754,root,root) /etc/rc.d/init.d/%{name}-dnsconfd
+
+%files autoipd
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/avahi
%attr(755,root,root) %{_sysconfdir}/%{name}/avahi-autoipd.action
%attr(755,root,root) %{_sbindir}/avahi-autoipd
%{_mandir}/man8/avahi-autoipd.8*
%attr(755,root,root) %{_libdir}/libavahi-common.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libavahi-common.so.3
%attr(755,root,root) %{_libdir}/libavahi-core.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavahi-core.so.5
+%attr(755,root,root) %ghost %{_libdir}/libavahi-core.so.6
# common for -discover*
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/interfaces
%files -n dotnet-avahi-devel
%defattr(644,root,root,755)
%{_prefix}/lib/mono/avahi-sharp
-%{_libdir}/monodoc/sources/avahi-sharp-docs.*
+%{_prefix}/lib/monodoc/sources/avahi-sharp-docs.*
%{_pkgconfigdir}/avahi-sharp.pc
%files -n dotnet-avahi-ui
%files -n dotnet-avahi-ui-devel
%defattr(644,root,root,755)
%{_prefix}/lib/mono/avahi-ui-sharp
-%{_libdir}/monodoc/sources/avahi-ui-sharp-docs.*
+%{_prefix}/lib/monodoc/sources/avahi-ui-sharp-docs.*
%{_pkgconfigdir}/avahi-ui-sharp.pc
%endif