]> git.pld-linux.org Git - packages/avahi.git/blobdiff - avahi.spec
- upstart jobs
[packages/avahi.git] / avahi.spec
index 7ad399d8d048271cc9e88d19ccd693b4311e4ed8..d3633540e20c2417b28db994e940d8745231ac01 100644 (file)
@@ -1,6 +1,3 @@
-# TODO:
-# - autoip subpackage ?
-# - autoip start script ?
 #
 # Conditional build:
 %bcond_without dotnet          # build without dotnet bindings
 %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.25
-Release:       4
+Release:       7
 License:       LGPL v2.1+
 Group:         Applications
 Source0:       http://avahi.org/download/%{name}-%{version}.tar.gz
@@ -33,11 +30,15 @@ Source0:    http://avahi.org/download/%{name}-%{version}.tar.gz
 Source1:       %{name}-daemon
 Source2:       %{name}-dnsconfd
 Source3:       %{name}.png
+Source4:       %{name}-daemon.upstart
+Source5:       %{name}-dnsconfd.upstart
 Patch0:                %{name}-desktop.patch
 Patch1:                %{name}-glade.patch
 Patch2:                %{name}-destdir.patch
 Patch3:                %{name}-mono-dir.patch
 Patch4:                nss-mdns-package.patch
+Patch5:                %{name}-dhclient_hooks.patch
+Patch6:                %{name}-autoipd-sbin_ip.patch
 URL:           http://avahi.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -57,7 +58,7 @@ BuildRequires:        libtool
 %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
@@ -71,11 +72,13 @@ BuildRequires:      QtCore-devel
 BuildRequires: qt4-build
 %endif
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.228
+BuildRequires: rpmbuild(macros) >= 1.561
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      dbus >= 0.92
 Requires:      libdaemon >= 0.11
+Requires:      rc-scripts >= 0.4.3
+Suggests:      nss_mdns >= 0.10-2
 Provides:      group(avahi)
 Provides:      user(avahi)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -90,6 +93,49 @@ Avahi jest implementacją specyfikacji DNS Service Discovery i
 Multicast DNS dla Zeroconf Computing. Używa D-BUSa dla komunikacji
 pomiędzy programami użytkownika a demonem systemowym.
 
+%package upstart
+Summary:       Upstart jobs description for Avahi daemons
+Summary(pl.UTF-8):     Opis zadań Upstart dla demonów Avahi
+Group:         Daemons
+Requires:      %{name} = %{version}-%{release}
+Requires:      upstart >= 0.6
+
+%description upstart
+Upstart jobs description for Avahi daemons.
+
+%description upstart -l pl.UTF-8
+Opis zadań Upstart dla demonów Avahi.
+
+%package autoipd
+Summary:       IPv4LL network address configuration daemon
+Summary(pl.UTF-8):     Demon configurujący adresy IPv4LL
+Group:         Networking/Daemons
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+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
@@ -433,7 +479,7 @@ Summary:    Development files for MONO Avahi 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.
@@ -459,7 +505,7 @@ Summary:    Development files for MONO Avahi UI 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.
@@ -528,6 +574,8 @@ Narzędzia linii poleceń korzystające z avahi-client.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 %{__intltoolize}
@@ -543,12 +591,15 @@ Narzędzia linii poleceń korzystające z avahi-client.
        %{!?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
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pixmapsdir},/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_pixmapsdir},/etc/rc.d/init.d,/etc/init}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -557,14 +608,18 @@ install -d $RPM_BUILD_ROOT{%{_pixmapsdir},/etc/rc.d/init.d}
 install -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d
 cp -a %{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
+
 ln -sf %{_includedir}/avahi-compat-libdns_sd/dns_sd.h \
        $RPM_BUILD_ROOT%{_includedir}/dns_sd.h
 
 ln -sf %{_pkgconfigdir}/avahi-compat-howl.pc \
        $RPM_BUILD_ROOT%{_pkgconfigdir}/howl.pc
 
-rm -f $RPM_BUILD_ROOT%{py_sitedir}/avahi/{__init__,SimpleGladeApp}.py \
-       $RPM_BUILD_ROOT%{py_sitedir}/avahi_discover/*.py
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
 
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{avahi-{browse-domains,publish-address,publish-service,resolve-address,resolve-host-name},bvnc}.1
 echo '.so avahi-browse.1' > $RPM_BUILD_ROOT%{_mandir}/man1/avahi-browse-domains.1
@@ -583,6 +638,10 @@ rm -rf $RPM_BUILD_ROOT
 %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
@@ -599,10 +658,24 @@ fi
 
 %postun
 if [ "$1" = "0" ]; then
-        %userremove avahi
+       %userremove avahi
        %groupremove avahi
 fi
 
+%postun autoipd
+if [ "$1" = "0" ]; then
+       %userremove avahi
+       %groupremove avahi
+fi
+
+%post upstart
+%upstart_post avahi-daemon
+%upstart_post avahi-dnsconfd
+
+%postun upstart
+%upstart_postun avahi-daemon
+%upstart_postun avahi-dnsconfd
+
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
@@ -663,7 +736,18 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/%{name}-daemon
 %attr(754,root,root) /etc/rc.d/init.d/%{name}-dnsconfd
 
+%files upstart
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/init/*.conf
+
+%files autoipd
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/avahi
 %attr(755,root,root) %{_sysconfdir}/%{name}/avahi-autoipd.action
+%dir %{_sysconfdir}/dhclient-enter-hooks.d
+%config(noreplace) %verify(not md5 mtime size) /etc/dhclient-enter-hooks.d/avahi-autoipd
+%dir %{_sysconfdir}/dhclient-exit-hooks.d
+%config(noreplace) %verify(not md5 mtime size) /etc/dhclient-exit-hooks.d/avahi-autoipd
 %attr(755,root,root) %{_sbindir}/avahi-autoipd
 %{_mandir}/man8/avahi-autoipd.8*
 %{_mandir}/man8/avahi-autoipd.action.8*
This page took 0.117208 seconds and 4 git commands to generate.