SPECS: lm_sensors.spec - Release 2 - loading modules and daemon in...
pascalek
pascalek at pld-linux.org
Wed Nov 15 16:30:56 CET 2006
Author: pascalek Date: Wed Nov 15 15:30:56 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- Release 2
- loading modules and daemon init separation
- config-default package
- sensors-detect moved to lm_sensors
- sensors.sh script for 'cool' sensors output display
---- Files affected:
SPECS:
lm_sensors.spec (1.166 -> 1.167)
---- Diffs:
================================================================
Index: SPECS/lm_sensors.spec
diff -u SPECS/lm_sensors.spec:1.166 SPECS/lm_sensors.spec:1.167
--- SPECS/lm_sensors.spec:1.166 Fri Oct 27 11:39:17 2006
+++ SPECS/lm_sensors.spec Wed Nov 15 16:30:50 2006
@@ -4,6 +4,11 @@
# /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
# - a big trigger warning how to use fancontrol and to init it first
#
+%define cmodule %{_sysconfdir}/sysconfig/sensors_modules
+%define cdaemon %{_sysconfdir}/sysconfig/sensors
+%define smodule %{_sysconfdir}/rc.d/init.d/sensors_modules
+%define sdaemon %{_sysconfdir}/rc.d/init.d/sensors
+
%include /usr/lib/rpm/macros.perl
Summary: Hardware health monitoring
Summary(pl): Monitor stanu sprzętu
@@ -12,7 +17,7 @@
Summary(uk): őÔÉĚŚÔÉ ÄĚŃ ÍĎÎŚÔĎŇÉÎÇŐ ÁĐÁŇÁÔŐŇÉ
Name: lm_sensors
Version: 2.10.1
-Release: 1
+Release: 2
License: GPL
Group: Applications/System
Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
@@ -21,6 +26,9 @@
Source2: sensors.sysconfig
Source3: fancontrol.init
Source4: fancontrol.sysconfig
+Source5: sensors.sh
+Source6: sensors_modules.init
+Source7: sensors_modules.sysconfig
Patch0: %{name}-make.patch
Patch1: %{name}-ppc.patch
Patch2: %{name}-iconv-in-libc.patch
@@ -36,6 +44,7 @@
Requires: %{name}-libs = %{version}-%{release}
Requires: dev >= 2.9.0-13
Requires: dmidecode
+Requires: %{name}-config
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -128,12 +137,23 @@
đÁËĹÔ lm_sensors-static ÍŚÓÔÉÔŘ ÓÔÁÔÉŢÎŚ ÂŚÂĚŚĎÔĹËÉ, ÎĹĎÂČŚÄÎŚ ÄĚŃ
ĐĎÂŐÄĎ×É ĐŇĎÇŇÁÍ, ŃËŚ ×ÉËĎŇÉÓÔĎ×ŐŔÔŘ ÄÁÎŚ ÓĹÎÓĎŇŚ×.
+%package config-default
+Summary: Sensors configuration files
+Summary(pl): Pliki konfiguracyjne lm_sensors
+Group: Applications/System
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-config
+
+%description config-default
+Default configuration files for lm_sensors.
+
%package sensord
Summary: Sensord daemon
Summary(pl): Demon sensord
Group: Daemons
Requires(post,preun): /sbin/chkconfig
Requires: %{name} = %{version}-%{release}
+Requires: %{name}-config
Requires: rc-scripts
%description sensord
@@ -193,7 +213,7 @@
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
- $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+ $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
%{__make} user_install \
DESTDIR=$RPM_BUILD_ROOT \
@@ -208,10 +228,13 @@
install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/sensors
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/sensors
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/fancontrol
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/fancontrol
+install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/sensors_modules
+install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/sensors_modules
# i2c API for userspace - included in glibc-kernel-headers
rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
@@ -222,12 +245,65 @@
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
-%post sensord
+%post
+if [ -f "%{cmodule}" ]; then
+ /sbin/chkconfig --add sensors_modules
+ %service sensors_modules restart "sensors modules"
+ if [ -f "%{sdaemon}" ]; then
+ /sbin/chkconfig --add sensors
+ %service sensors restart "sensors deamon"
+ fi
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+ if [ -f "%{sdaemon}" ]; then
+ %service sensors stop
+ /sbin/chkconfig --del sensors
+ fi
+ %service sensors_modules stop
+ /sbin/chkconfig --del sensors_modules
+fi
+
+%post config-default
if [ "$1" = 1 ]; then
- echo "You have to configure sensors modules in /etc/sysconfig/sensors"
+cat << EOF
+ *********************************************************************
+ * *
+ * NOTE: *
+ * You have to configure sensors to match your motherboard sensors *
+ * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
+ * sensors-detect script which can help you find proper modules. *
+ * *
+ *********************************************************************
+EOF
+fi
+if [ -f "%{smodule}" ]; then
+ /sbin/chkconfig --add sensors_modules
+ %service sensors_modules restart "sensors modules"
+fi
+if [ -f "%{sdaemon}" ]; then
+ /sbin/chkconfig --add sensors
+ %service sensors restart "sensors daemon"
+fi
+
+%preun config-default
+if [ "$1" = "0" ]; then
+ if [ -f "%{sdaemon}" ]; then
+ %service sensors stop
+ /sbin/chkconfig --del sensors
+ fi
+ if [ -f "%{smodule}" ]; then
+ %service sensors_modules stop
+ /sbin/chkconfig --del sensors_modules
+ fi
+fi
+
+%post sensord
+if [ -f "%{cmodule}" ]; then
+ /sbin/chkconfig --add sensors
+ %service sensors restart "sensors daemon"
fi
-/sbin/chkconfig --add sensors
-%service sensors restart "sensors daemon"
%preun sensord
if [ "$1" = "0" ]; then
@@ -256,19 +332,26 @@
%attr(755,root,root) %{_bindir}/ddcmon
%attr(755,root,root) %{_bindir}/decode-*.pl
%attr(755,root,root) %{_bindir}/sensors
+%attr(755,root,root) %{_bindir}/sensors.sh
%attr(755,root,root) %{_sbindir}/eeprom*
%attr(755,root,root) %{_sbindir}/i2c*
+%attr(755,root,root) %{_sbindir}/sensors-detect
%ifarch %{ix86} %{x8664}
%attr(755,root,root) %{_sbindir}/isadump
%attr(755,root,root) %{_sbindir}/isaset
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/sensors_modules
%{_mandir}/man8/isadump.8*
%{_mandir}/man8/isaset.8*
%endif
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
%{_mandir}/man1/sensors.1*
%{_mandir}/man5/sensors.conf.5*
%{_mandir}/man8/i2c*.8*
+%files config-default
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysconfig/sensors_modules
+
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so.*.*
@@ -288,9 +371,8 @@
%files sensord
%defattr(644,root,root,755)
%attr(754,root,root) %{_sbindir}/sensord
-%attr(755,root,root) %{_sbindir}/sensors-detect
-%attr(754,root,root) /etc/rc.d/init.d/sensors
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/sensors
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysconfig/sensors
%{_mandir}/man8/sensors-detect.8*
%{_mandir}/man8/sensord.8*
@@ -298,8 +380,8 @@
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/fancontrol
%attr(755,root,root) %{_sbindir}/pwmconfig
-%attr(754,root,root) /etc/rc.d/init.d/fancontrol
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/fancontrol
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysconfig/fancontrol
%{_mandir}/man8/fancontrol.8*
%{_mandir}/man8/pwmconfig.8*
@@ -309,6 +391,13 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.167 2006/11/15 15:30:50 pascalek
+- Release 2
+- loading modules and daemon init separation
+- config-default package
+- sensors-detect moved to lm_sensors
+- sensors.sh script for 'cool' sensors output display
+
Revision 1.166 2006/10/27 09:39:17 qboosh
- -libs Conflicts base before split
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/lm_sensors.spec?r1=1.166&r2=1.167&f=u
More information about the pld-cvs-commit
mailing list