diff --git a/bwbar.changes b/bwbar.changes index e58130d..a13186e 100644 --- a/bwbar.changes +++ b/bwbar.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Oct 26 12:24:59 UTC 2013 - p.drouand@gmail.com + +- Don't provide sysvinit and systemd support on the same system; + Provide either one or the other + ------------------------------------------------------------------- Sun Aug 11 13:13:29 UTC 2013 - andreas.stieger@gmx.de diff --git a/bwbar.spec b/bwbar.spec index c27edf4..09999c4 100644 --- a/bwbar.spec +++ b/bwbar.spec @@ -70,12 +70,12 @@ install -d %buildroot%{_bindir} install -m 755 bwbar %buildroot%{_bindir} install -m 644 -D %{SOURCE2} %buildroot/var/adm/fillup-templates/sysconfig.%{name} # +%if 0%{?has_systemd} +install -m 644 -D %{SOURCE4} %buildroot/%{_unitdir}/%name.service +%else install -m 755 -D %{SOURCE3} %buildroot%{_sysconfdir}/init.d/%{name} mkdir -p %buildroot%{_sbindir} ln -svf ../../etc/init.d/%{name} %buildroot/%{_sbindir}/rc%{name} -# -%if 0%{?has_systemd} -install -m 644 -D %{SOURCE4} %buildroot/%{_unitdir}/%name.service %endif # @@ -85,33 +85,38 @@ install -m 644 -D %{SOURCE4} %buildroot/%{_unitdir}/%name.service %endif %post -%{fillup_and_insserv} %if 0%{?has_systemd} %service_add_post bwbar.service +%{fillup_only} +%else +%{fillup_and_insserv} %endif %preun -%stop_on_removal %if 0%{?has_systemd} %service_del_preun bwbar.service +%else +%stop_on_removal %endif %postun -%insserv_cleanup -%restart_on_update %if 0%{?has_systemd} %service_del_postun bwbar.service +%else +%insserv_cleanup +%restart_on_update %endif %files %defattr(-, root, root) %doc README COPYING %{_bindir}/* -%{_sbindir}/* /var/adm/fillup-templates/sysconfig.%{name} -%config %{_sysconfdir}/init.d/%{name} %if 0%{?has_systemd} %{_unitdir}/%{name}.service +%else +%{_sbindir}/* +%config %{_sysconfdir}/init.d/%{name} %endif %changelog