diff --git a/dnsmasq.changes b/dnsmasq.changes index f19bdb4..20639b5 100644 --- a/dnsmasq.changes +++ b/dnsmasq.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 22 12:53:03 UTC 2013 - rmilasan@suse.com + +- Install dnsmasq.service accordingly (/usr/lib/systemd for 12.3 + and up or /lib/systemd for older versions). + ------------------------------------------------------------------- Fri Dec 14 15:32:27 UTC 2012 - toganm@opensuse.org diff --git a/dnsmasq.spec b/dnsmasq.spec index 3397dd7..b1f3b1d 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -1,7 +1,7 @@ # # spec file for package dnsmasq # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -39,6 +39,12 @@ BuildRequires: pkgconfig(libnetfilter_conntrack) %{?systemd_requires} +%if %suse_version > 1220 +%define _unitdir /usr/lib/systemd +%else +%define _unitdir /lib/systemd +%endif + %description Dnsmasq is a lightweight, easy-to-configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small @@ -103,7 +109,7 @@ install -m 644 SuSEFirewall.dnsmasq-dns ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconf install -m 644 SuSEFirewall.dnsmasq-dhcp ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp install -d 755 ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/ install -m 644 dbus/dnsmasq.conf ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/dnsmasq.conf -install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service +install -D -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/system/dnsmasq.service install -d -m 0750 ${RPM_BUILD_ROOT}/srv/tftpboot %find_lang %{name} --with-man @@ -120,7 +126,7 @@ install -d -m 0750 ${RPM_BUILD_ROOT}/srv/tftpboot %config %attr(0644,root,root) /%{_sysconfdir}/slp.reg.d/dnsmasq.reg %{_mandir}/man8/dnsmasq.8.gz /etc/dbus-1/system.d/dnsmasq.conf -/lib/systemd/system/dnsmasq.service +%{_unitdir}/system/dnsmasq.service %dir %attr(0750,root,tftp) /srv/tftpboot %changelog