systemd support [release 2.72-2mamba;Mon Nov 24 2014]
This commit is contained in:
parent
3a0e99cb1e
commit
80f0bccb80
39
dnsmasq.spec
39
dnsmasq.spec
@ -1,6 +1,6 @@
|
||||
Name: dnsmasq
|
||||
Version: 2.72
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: A lightweight DHCP/caching DNS server
|
||||
Group: System/Servers
|
||||
Vendor: openmamba
|
||||
@ -13,6 +13,9 @@ Patch0: %{name}-2.52-use_var_lib_dnsmasq.patch
|
||||
Patch1: %{name}-2.52-have_dbus.patch
|
||||
Patch2: %{name}-2.72-enable_etc_dnsmasq_d.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
@ -28,6 +31,8 @@ Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network b
|
||||
#%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
patch -p1 < contrib/systemd/dbus_activation
|
||||
|
||||
%build
|
||||
%make
|
||||
|
||||
@ -45,36 +50,44 @@ install dnsmasq.conf.example %{buildroot}%{_sysconfdir}/dnsmasq.conf
|
||||
install dbus/dnsmasq.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/
|
||||
install -m 644 man/dnsmasq.8 %{buildroot}%{_mandir}/man8/
|
||||
|
||||
install -D -p -m 755 %{S:1} %{buildroot}%{_initrddir}/dnsmasq
|
||||
install -D -m0644 contrib/systemd/dnsmasq.service %{buildroot}%{_unitdir}/dnsmasq.service
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post
|
||||
if [ "$1" = "2" ]; then
|
||||
/sbin/service dnsmasq condrestart >/dev/null 2>&1 || :
|
||||
if [ $1 -gt 1 ]; then
|
||||
# clean old sysv broken links
|
||||
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
|
||||
fi
|
||||
exit 0
|
||||
if [ $1 -ge 1 ]; then
|
||||
systemctl -q daemon-reload
|
||||
fi
|
||||
:
|
||||
|
||||
%preun
|
||||
if [ "$1" = "0" ]; then
|
||||
/sbin/service dnsmasq stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del dnsmasq
|
||||
fi
|
||||
exit 0
|
||||
systemctl -q stop %{name}.service
|
||||
systemctl -q daemon-reload
|
||||
fi
|
||||
:
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/dnsmasq
|
||||
%dir /etc/dnsmasq.d
|
||||
%{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
|
||||
%dir %{_sysconfdir}/dnsmasq.d
|
||||
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf
|
||||
%{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
|
||||
%dir %{_var}/lib/dnsmasq
|
||||
%{_initrddir}/dnsmasq
|
||||
%{_unitdir}/dnsmasq.service
|
||||
%{_mandir}/man8/dnsmasq.*
|
||||
%doc CHANGELOG COPYING FAQ doc.html setup.html dbus/DBus-interface
|
||||
%doc COPYING
|
||||
#%doc CHANGELOG FAQ doc.html setup.html dbus/DBus-interface
|
||||
|
||||
%changelog
|
||||
* Mon Nov 24 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.72-2mamba
|
||||
- systemd support
|
||||
|
||||
* Fri Sep 26 2014 Automatic Build System <autodist@mambasoft.it> 2.72-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user