SPECS: lm_sensors.spec - fancontrol subpackage - reverted my earli...
czarny
czarny at pld-linux.org
Thu Sep 28 12:37:17 CEST 2006
Author: czarny Date: Thu Sep 28 10:37:17 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- fancontrol subpackage
- reverted my earlier PLD-ize idea
- moved some files to fancontrol subpackage
- works now as a service
---- Files affected:
SPECS:
lm_sensors.spec (1.159 -> 1.160)
---- Diffs:
================================================================
Index: SPECS/lm_sensors.spec
diff -u SPECS/lm_sensors.spec:1.159 SPECS/lm_sensors.spec:1.160
--- SPECS/lm_sensors.spec:1.159 Wed Sep 27 15:43:21 2006
+++ SPECS/lm_sensors.spec Thu Sep 28 12:37:11 2006
@@ -2,8 +2,6 @@
# TODO
# - unpackaged:
# /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
-# - add fancontrol(d) subpackage
-# - update and use fancontrol.init
# - a big trigger warning how to use fancontrol and to init it first
#
%include /usr/lib/rpm/macros.perl
@@ -22,6 +20,7 @@
Source1: sensors.init
Source2: sensors.sysconfig
Source3: fancontrol.init
+Source4: fancontrol.sysconfig
Patch0: %{name}-make.patch
Patch1: %{name}-ppc.patch
Patch2: %{name}-iconv-in-libc.patch
@@ -141,6 +140,31 @@
%description sensord -l pl
Demon sensord.
+%package fancontrol
+Summary: Fancontrol daemon
+Summary(pl): Demon kontroli wiatraka
+Group: Daemons
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-sensord = %{version}-%{release}
+Requires: rc-scripts
+
+%description fancontrol
+Fancontrol daemon monitors current temperature of the computer and
+adjusts fans speed acordingly.
+
+It is crucial to correctly configure this daemon (via running service
+fancontrol init) and ensuring, that the temperature levels are set not
+to burn the insides of the computer!
+
+%description fancontrol -l pl
+Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
+prędkość wiatraków odpowiednio.
+
+Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
+uruchomienie service fancontrol init) oraz upewnić się, że progi temperatury
+są ustawione poprawnie, by nie spalić wnętrza komputera!
+
%prep
%setup -q
%patch0 -p1
@@ -155,7 +179,7 @@
LIBDIR=%{_libdir} \
LINUX=/dev/null \
LINUX_HEADERS=%{_kernelsrcdir}/include \
- I2C_HEADERS=/usr/include \
+ I2C_HEADERS=%{_includedir} \
PROG_EXTRA:="sensord" \
SYSFS_SUPPORT:=1
@@ -163,10 +187,6 @@
CC="%{__cc}" \
CFLAGS="%{rpmcflags} -I../../kernel/include"
-# PLD-ize fancontrol
-%{__sed} -i -e "s@/etc/fancontrol@/etc/sysconfig/fancontrol at g" prog/pwm/fancontrol
-%{__sed} -i -e "s@/etc/fancontrol@/etc/sysconfig/fancontrol at g" prog/pwm/pwmconfig
-
%install
rm -rf $RPM_BUILD_ROOT
@@ -182,12 +202,14 @@
PROG_EXTRA:="sensord" \
LINUX=/dev/null \
LINUX_HEADERS=%{_kernelsrcdir}/include \
- I2C_HEADERS=/usr/include
+ I2C_HEADERS=%{_includedir}
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
# i2c API for userspace - included in glibc-kernel-headers
rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
@@ -205,12 +227,25 @@
/sbin/chkconfig --add sensors
%service sensors restart "sensors daemon"
+%post fancontrol
+if [ "$1" = 1 ]; then
+ echo "You have to configure facontrol by running service fancontrol init first."
+fi
+/sbin/chkconfig --add sensors
+%service fancontrol restart "sensors daemon"
+
%preun sensord
if [ "$1" = "0" ]; then
%service sensors stop
/sbin/chkconfig --del sensors
fi
+%preun fancontrol
+if [ "$1" = "0" ]; then
+ %service sensors stop
+ /sbin/chkconfig --del sensors
+fi
+
%files
%defattr(644,root,root,755)
%doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
@@ -221,7 +256,6 @@
%attr(755,root,root) %{_bindir}/sensors
%attr(755,root,root) %{_sbindir}/sensors-detect
%attr(755,root,root) %{_sbindir}/eeprom*
-%attr(755,root,root) %{_sbindir}/fancontrol
%attr(755,root,root) %{_sbindir}/i2c*
%ifarch %{ix86} %{x8664}
%attr(755,root,root) %{_sbindir}/isadump
@@ -229,13 +263,10 @@
%{_mandir}/man8/isadump.8*
%{_mandir}/man8/isaset.8*
%endif
-%attr(755,root,root) %{_sbindir}/pwmconfig
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
%{_mandir}/man1/sensors.1*
%{_mandir}/man5/sensors.conf.5*
-%{_mandir}/man8/fancontrol.8*
%{_mandir}/man8/i2c*.8*
-%{_mandir}/man8/pwmconfig.8*
%{_mandir}/man8/sensors-detect.8*
%files libs
@@ -261,12 +292,27 @@
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
%{_mandir}/man8/sensord.8*
+%files fancontrol
+%defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/fancontrol
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
+%attr(755,root,root) %{_sbindir}/fancontrol
+%attr(755,root,root) %{_sbindir}/pwmconfig
+%{_mandir}/man8/fancontrol.8*
+%{_mandir}/man8/pwmconfig.8*
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.160 2006/09/28 10:37:11 czarny
+- fancontrol subpackage
+- reverted my earlier PLD-ize idea
+- moved some files to fancontrol subpackage
+- works now as a service
+
Revision 1.159 2006/09/27 13:43:21 glen
- do not use macro for /etc/sysconfig
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/lm_sensors.spec?r1=1.159&r2=1.160&f=u
More information about the pld-cvs-commit
mailing list