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