Fix systemd unit installation
This commit is contained in:
parent
f5c5ea6747
commit
e71f245ebc
24
avahi.spec
24
avahi.spec
@ -6,7 +6,7 @@
|
||||
%endif
|
||||
Name: avahi
|
||||
Version: 0.6.26
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Local network service discovery
|
||||
Group: System Environment/Base
|
||||
License: LGPLv2
|
||||
@ -82,7 +82,6 @@ Graphical user interface tools that use Avahi to browse for mDNS services.
|
||||
Summary: Glib libraries for avahi
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: glib2
|
||||
|
||||
%description glib
|
||||
Libraries for easy use of avahi from glib applications.
|
||||
@ -101,7 +100,6 @@ necessary for developing programs using avahi with glib.
|
||||
%package gobject
|
||||
Summary: GObject wrapper library for Avahi
|
||||
Group: System Environment/Base
|
||||
Requires: glib2
|
||||
Requires: %{name}-glib = %{version}-%{release}
|
||||
|
||||
%description gobject
|
||||
@ -304,7 +302,7 @@ fashion with mDNS.
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --with-distro=fedora --disable-monodoc --with-avahi-user=avahi --with-avahi-group=avahi --with-avahi-priv-access-group=avahi --with-autoipd-user=avahi-autoipd --with-autoipd-group=avahi-autoipd \
|
||||
%configure --with-distro=fedora --disable-monodoc --with-avahi-user=avahi --with-avahi-group=avahi --with-avahi-priv-access-group=avahi --with-autoipd-user=avahi-autoipd --with-autoipd-group=avahi-autoipd --with-systemdsystemunitdir=/lib/systemd/system \
|
||||
%if %{WITH_COMPAT_DNSSD}
|
||||
--enable-compat-libdns_sd \
|
||||
%endif
|
||||
@ -375,6 +373,7 @@ getent passwd avahi >/dev/null 2>&1 || useradd \
|
||||
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || :
|
||||
# Run avahi-daemon by default:
|
||||
/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 || :
|
||||
/usr/bin/systemd-install enable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
if [ "$1" -eq 1 ]; then
|
||||
if [ -s /etc/localtime ]; then
|
||||
cp -cfp /etc/localtime /etc/avahi/etc/localtime || :
|
||||
@ -384,7 +383,8 @@ fi
|
||||
%preun
|
||||
if [ "$1" -eq 0 ]; then
|
||||
/sbin/service avahi-daemon stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del avahi-daemon
|
||||
/sbin/chkconfig --del avahi-daemon >/dev/null 2>&1 || :
|
||||
/usr/bin/systemd-install disable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
@ -416,7 +416,8 @@ getent passwd avahi-autoipd >/dev/null 2>&1 || useradd \
|
||||
%preun dnsconfd
|
||||
if [ "$1" -eq 0 ]; then
|
||||
/sbin/service avahi-dnsconfd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del avahi-dnsconfd
|
||||
/sbin/chkconfig --del avahi-dnsconfd >/dev/null 2>&1 || :
|
||||
/usr/bin/systemd-install disable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun dnsconfd
|
||||
@ -433,6 +434,9 @@ fi
|
||||
%post compat-libdns_sd -p /sbin/ldconfig
|
||||
%postun compat-libdns_sd -p /sbin/ldconfig
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%post qt3 -p /sbin/ldconfig
|
||||
%postun qt3 -p /sbin/ldconfig
|
||||
|
||||
@ -442,6 +446,9 @@ fi
|
||||
%post ui -p /sbin/ldconfig
|
||||
%postun ui -p /sbin/ldconfig
|
||||
|
||||
%post ui-gtk3 -p /sbin/ldconfig
|
||||
%postun ui-gtk3 -p /sbin/ldconfig
|
||||
|
||||
%post gobject -p /sbin/ldconfig
|
||||
%postun gobject -p /sbin/ldconfig
|
||||
|
||||
@ -457,7 +464,7 @@ fi
|
||||
%ghost %attr(0755,avahi,avahi) %dir %{_localstatedir}/run/avahi-daemon
|
||||
%config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf
|
||||
%config(noreplace) %{_sysconfdir}/avahi/services/ssh.service
|
||||
%{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
|
||||
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
|
||||
%attr(0755,root,root) %{_sbindir}/avahi-daemon
|
||||
%dir %{_datadir}/avahi
|
||||
%{_datadir}/avahi/*.dtd
|
||||
@ -632,6 +639,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jun 29 2010 Lennart Poettering <lpoetter@redhat.com> 0.6.26-3
|
||||
- Fix systemd unit installation
|
||||
|
||||
* Tue Jun 29 2010 Lennart Poettering <lpoetter@redhat.com> 0.6.26-2
|
||||
- Add missing dependencies
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user