Accepting request 204880 from network:utilities

little fix (forwarded request 204855 from posophe)

OBS-URL: https://build.opensuse.org/request/show/204880
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bwbar?expand=0&rev=3
This commit is contained in:
Stephan Kulow
2013-10-29 08:14:30 +00:00
committed by Git OBS Bridge
2 changed files with 20 additions and 9 deletions

View File

@@ -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 Sun Aug 11 13:13:29 UTC 2013 - andreas.stieger@gmx.de

View File

@@ -70,12 +70,12 @@ install -d %buildroot%{_bindir}
install -m 755 bwbar %buildroot%{_bindir} install -m 755 bwbar %buildroot%{_bindir}
install -m 644 -D %{SOURCE2} %buildroot/var/adm/fillup-templates/sysconfig.%{name} 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} install -m 755 -D %{SOURCE3} %buildroot%{_sysconfdir}/init.d/%{name}
mkdir -p %buildroot%{_sbindir} mkdir -p %buildroot%{_sbindir}
ln -svf ../../etc/init.d/%{name} %buildroot/%{_sbindir}/rc%{name} ln -svf ../../etc/init.d/%{name} %buildroot/%{_sbindir}/rc%{name}
#
%if 0%{?has_systemd}
install -m 644 -D %{SOURCE4} %buildroot/%{_unitdir}/%name.service
%endif %endif
# #
@@ -85,33 +85,38 @@ install -m 644 -D %{SOURCE4} %buildroot/%{_unitdir}/%name.service
%endif %endif
%post %post
%{fillup_and_insserv}
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_add_post bwbar.service %service_add_post bwbar.service
%{fillup_only}
%else
%{fillup_and_insserv}
%endif %endif
%preun %preun
%stop_on_removal
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_del_preun bwbar.service %service_del_preun bwbar.service
%else
%stop_on_removal
%endif %endif
%postun %postun
%insserv_cleanup
%restart_on_update
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_del_postun bwbar.service %service_del_postun bwbar.service
%else
%insserv_cleanup
%restart_on_update
%endif %endif
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%doc README COPYING %doc README COPYING
%{_bindir}/* %{_bindir}/*
%{_sbindir}/*
/var/adm/fillup-templates/sysconfig.%{name} /var/adm/fillup-templates/sysconfig.%{name}
%config %{_sysconfdir}/init.d/%{name}
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%else
%{_sbindir}/*
%config %{_sysconfdir}/init.d/%{name}
%endif %endif
%changelog %changelog