diff --git a/radvd.spec b/radvd.spec index f8e4a1b..c84ad87 100644 --- a/radvd.spec +++ b/radvd.spec @@ -19,6 +19,10 @@ Requires(post): chkconfig Requires(pre): /usr/sbin/useradd BuildRequires: flex, flex-static, byacc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: systemd-units +Requires: systemd-units +Conflicts: systemd < 38 +Conflicts: filesystem < 3 %description radvd is the router advertisement daemon for IPv6. It listens to router @@ -52,7 +56,7 @@ make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig mkdir -p $RPM_BUILD_ROOT%{initdir} mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/radvd -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -m 644 redhat/radvd.conf.empty $RPM_BUILD_ROOT%{_sysconfdir}/radvd.conf install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{initdir}/radvd @@ -60,7 +64,7 @@ install -m 644 redhat/radvd.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ra install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/radvd.conf -install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/lib/systemd/system +install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_unitdir} %clean [ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT @@ -97,7 +101,7 @@ exit 0 %files %defattr(-,root,root,-) %doc COPYRIGHT README CHANGES INTRO.html TODO -/lib/systemd/system/radvd.service +%{_unitdir}/radvd.service %config(noreplace) %{_sysconfdir}/radvd.conf %config(noreplace) %{_sysconfdir}/sysconfig/radvd %config(noreplace) %{_sysconfdir}/tmpfiles.d/radvd.conf