Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
hddtemp
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 2
[-]
[+]
Changed
hddtemp.spec
@@ -56,7 +56,6 @@ [ "${RPM_BUILD_ROOT}" != "/" ] && %{__rm} -rf ${RPM_BUILD_ROOT} %makeinstall %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d -%{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}/misc/ %{__install} -m 0644 hddtemp.db ${RPM_BUILD_ROOT}%{_datadir}/misc/ %{__mkdir_p} ${RPM_BUILD_ROOT}/etc/ @@ -64,7 +63,13 @@ %{__ln_s} ..%{_datadir}/misc/hddtemp.db ./hddtemp.db cd - %{__install} -m 0755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name} -%{__install} -m 0644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} +%if 0%{?suse_version} +%{__install} -D -m 0644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} +%else +%{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +%{__install} -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/hddtemp +%endif + cd ${RPM_BUILD_ROOT}%{_sbindir} %{__ln_s} ../..%{_sysconfdir}/init.d/%{name} rc%{name} %{__chmod} +s hddtemp @@ -82,6 +87,9 @@ echo PATH=\$PATH:/usr/sbin >> /etc/bash.bashrc.local fi fi +%if 0%{?suse_version} +%{fillup_and_insserv hddtemp} +%else case "$1" in 1) # new install chkconfig --add %{name} @@ -90,18 +98,24 @@ %{_sysconfdir}/init.d/%{name} restart ;; esac +%endif %preun -if [ "$1" = "0" ]; then # remove - chkconfig --del %{name} +%if 0%{?suse_version} +%stop_on_removal hddtemp +%else +if [ $1 = 0 ]; then + %{_sysconfdir}/init.d/hddtemp stop + /sbin/chkconfig --del hddtemp fi +%endif %files %defattr(-,root,root) %doc COPYING README TODO contribs %config(noreplace) %{_datadir}/misc/hddtemp.db %config(noreplace) %{_sysconfdir}/init.d/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} /etc/hddtemp.db %{_datadir}/locale/*/LC_MESSAGES/hddtemp.mo %{_mandir}/man8/*