3 # /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
4 # - a big trigger warning how to use fancontrol and to init it first
6 %define cmodule /etc/sysconfig/sensors_modules
7 %define cdaemon /etc/sysconfig/sensors
8 %define smodule /etc/rc.d/init.d/sensors_modules
9 %define sdaemon /etc/rc.d/init.d/sensors
11 %include /usr/lib/rpm/macros.perl
12 Summary: Hardware health monitoring
13 Summary(pl): Monitor stanu sprzêtu
14 Summary(pt_BR): Ferramentas para monitoração do hardware
15 Summary(ru): õÔÉÌÉÔÙ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ ÁÐÐÁÒÁÔÕÒÙ
16 Summary(uk): õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
21 Group: Applications/System
22 Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
23 # Source0-md5: a424c54006483e978cc3f885f50989a5
25 Source2: sensors.sysconfig
26 Source3: fancontrol.init
27 Source4: fancontrol.sysconfig
29 Source6: sensors_modules.init
30 Source7: sensors_modules.sysconfig
31 Patch0: %{name}-make.patch
32 Patch1: %{name}-ppc.patch
33 Patch2: %{name}-iconv-in-libc.patch
34 Patch3: %{name}-sensors-detect-PATH.patch
35 URL: http://www.lm-sensors.nu/
37 BuildRequires: flex >= 2.5.1
38 BuildRequires: perl-modules >= 5.6
39 BuildRequires: rpm-perlprov >= 3.0.3-16
40 BuildRequires: rpmbuild(macros) >= 1.268
41 BuildRequires: rrdtool-devel >= 1.2.10
42 BuildRequires: sysfsutils-devel
43 Requires: %{name}-libs = %{version}-%{release}
44 Requires: dev >= 2.9.0-13
46 Requires: %{name}-config
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Tools for monitoring the hardware health of Linux systems containing
51 hardware health monitoring hardware such as the LM78 and LM75.
54 Narzêdzie do monitorowania sprzêtu w systemach linuksowych
55 wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
58 Ferramentas para monitoração do hardware. Contém uma coleção de
59 módulos para acesso genérico ao barramento SMBus e monitoração de
63 ðÁËÅÔ lm_sensors ÓÏÄÅÒÖÉÔ ÎÁÂÏÒ ÍÏÄÕÌÅÊ ÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÁ Ë
64 SMBus É ÍÏÎÉÔÏÒÉÎÇÁ. ÷îéíáîéå: ÄÌÑ ÜÔÏÇÏ ÎÅÏÂÈÏÄÉÍÁ ÓÐÅÃÉÁÌØÎÁÑ
65 ÐÏÄÄÅÒÖËÁ, ÏÔÓÕÔÓÔ×ÕÀÝÁÑ × ÓÔÁÎÄÁÒÔÎÙÈ ÓÔÁÒÙÈ ÑÄÒÁÈ 2.2.XX!
68 ðÁËÅÔ lm_sensors ͦÓÔÉÔØ ÎÁÂ¦Ò ÍÏÄÕÌ¦× ÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÕ ÄÏ
69 SMBus ÔÁ ÍÏΦÔÏÒÉÎÇÕ. õ÷áçá: ÄÌÑ ÃØÏÇÏ ÐÏÔÒ¦ÂÎÁ ÓÐÅæÁÌØÎÁ ЦÄÔÒÉÍËÁ,
70 ÑËÁ צÄÓÕÔÎÑ Õ ÓÔÁÎÄÁÒÔÎÉÈ ÓÔÁÒÉÈ ÑÄÒÁÈ 2.2.XX!
73 Summary: lm_sensors library
74 Summary(pl): Biblioteka lm_sensors
76 Obsoletes: liblm_sensors1
77 Conflicts: lm_sensors <= 2.9.2-2
82 %description libs -l pl
83 Biblioteka lm_sensors.
86 Summary: Header files for lm_sensors
87 Summary(pl): Pliki nag³ówkowe dla lm_sensors
88 Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
89 Summary(ru): æÁÊÌÙ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
90 Summary(uk): æÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
91 Group: Development/Libraries
92 Requires: %{name}-libs = %{version}-%{release}
93 Obsoletes: liblm_sensors1-devel
96 Header files for lm_sensors.
98 %description devel -l pl
99 Pliki nag³ówkowe dla lm_sensors.
101 %description devel -l pt_BR
102 Arquivos necessários ao desenvolvimento de programas que usem o
105 %description devel -l ru
106 ðÁËÅÔ lm_sensors-devel ×ËÌÀÞÁÅÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
107 ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
109 %description devel -l uk
110 ðÁËÅÔ lm_sensors-devel ͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
111 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
114 Summary: Static libraries for lm_sensors
115 Summary(pl): Biblioteki statyczne dla lm_sensors
116 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com lm_sensors
117 Summary(ru): óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
118 Summary(uk): óÔÁÔÉÞÎÁ ¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
119 Group: Development/Libraries
120 Requires: %{name}-devel = %{version}-%{release}
123 Static libraries for lm_sensors.
125 %description static -l pl
126 Biblioteki statyczne dla lm_sensors.
128 %description static -l pt_BR
129 Bibliotecas estáticas para desenvolvimento com lm_sensors
131 %description static -l ru
132 ðÁËÅÔ lm_sensors-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ
133 ÄÌÑ ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
135 %description static -l uk
136 ðÁËÅÔ lm_sensors-static ͦÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
137 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
139 %package config-default
140 Summary: Default sensors configuration files
141 Summary(pl): Domy¶lne pliki konfiguracyjne lm_sensors
142 Group: Applications/System
143 Requires: %{name} = %{version}-%{release}
144 Provides: %{name}-config
146 %description config-default
147 Default configuration files for lm_sensors.
149 %description config-default -l pl
150 Domy¶lne pliki konfiguracyjne lm_sensors.
153 Summary: Sensord daemon
154 Summary(pl): Demon sensord
156 Requires(post,preun): /sbin/chkconfig
157 Requires: %{name} = %{version}-%{release}
158 Requires: %{name}-config
164 %description sensord -l pl
168 Summary: Fancontrol daemon
169 Summary(pl): Demon sterowania wiatraczkami
171 Requires(post,preun): /sbin/chkconfig
172 Requires: %{name} = %{version}-%{release}
173 Requires: %{name}-sensord = %{version}-%{release}
176 %description fancontrol
177 Fancontrol daemon monitors current temperature of the computer and
178 adjusts fans speed acordingly.
180 It is crucial to correctly configure this daemon (via running service
181 fancontrol init) and ensuring, that the temperature levels are set not
182 to burn the insides of the computer!
184 %description fancontrol -l pl
185 Demon fancontrol monitoruje obecn± temperaturê komputera i ustawia
186 odpowiednio prêdko¶æ wiatraków.
188 Kluczowym jest, aby poprawnie skonfigurowaæ tego demona (poprzez
189 uruchomienie service fancontrol init) oraz upewniæ siê, ¿e progi
190 temperatury s± ustawione poprawnie, by nie spaliæ wnêtrza komputera!
202 OPTS="%{rpmcflags}" \
205 LINUX_HEADERS=%{_kernelsrcdir}/include \
206 I2C_HEADERS=/usr/include \
207 PROG_EXTRA:="sensord" \
210 %{__make} -C prog/eepromer \
212 CFLAGS="%{rpmcflags} -I../../kernel/include"
215 rm -rf $RPM_BUILD_ROOT
217 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
218 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
220 %{__make} user_install \
221 DESTDIR=$RPM_BUILD_ROOT \
223 ETCDIR=%{_sysconfdir} \
226 PROG_EXTRA:="sensord" \
228 LINUX_HEADERS=%{_kernelsrcdir}/include \
229 I2C_HEADERS=/usr/include
231 install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
233 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
234 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
235 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
236 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
237 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
238 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
239 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
241 # i2c API for userspace - included in linux-libc-headers
242 rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
245 rm -rf $RPM_BUILD_ROOT
247 %post libs -p /sbin/ldconfig
248 %postun libs -p /sbin/ldconfig
251 if [ -f "%{cmodule}" ]; then
252 /sbin/chkconfig --add sensors_modules
253 %service sensors_modules restart "sensors modules"
254 if [ -f "%{sdaemon}" ]; then
255 /sbin/chkconfig --add sensors
256 %service sensors restart "sensors deamon"
261 if [ "$1" = "0" ]; then
262 if [ -f "%{sdaemon}" ]; then
263 %service sensors stop
264 /sbin/chkconfig --del sensors
266 %service sensors_modules stop
267 /sbin/chkconfig --del sensors_modules
271 if [ "$1" = 1 ]; then
273 *********************************************************************
276 * You have to configure sensors to match your motherboard sensors *
277 * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
278 * sensors-detect script which can help you find proper modules. *
280 *********************************************************************
283 if [ -f "%{smodule}" ]; then
284 /sbin/chkconfig --add sensors_modules
285 %service sensors_modules restart "sensors modules"
287 if [ -f "%{sdaemon}" ]; then
288 /sbin/chkconfig --add sensors
289 %service sensors restart "sensors daemon"
292 %preun config-default
293 if [ "$1" = "0" ]; then
294 if [ -f "%{sdaemon}" ]; then
295 %service sensors stop
296 /sbin/chkconfig --del sensors
298 if [ -f "%{smodule}" ]; then
299 %service sensors_modules stop
300 /sbin/chkconfig --del sensors_modules
305 if [ -f "%{cmodule}" ]; then
306 /sbin/chkconfig --add sensors
307 %service sensors restart "sensors daemon"
311 if [ "$1" = "0" ]; then
312 %service sensors stop
313 /sbin/chkconfig --del sensors
317 if [ "$1" = 1 ]; then
318 echo "You have to configure fancontrol by running service fancontrol init first."
320 /sbin/chkconfig --add fancontrol
321 %service fancontrol restart "fancontrol daemon"
324 if [ "$1" = "0" ]; then
325 %service fancontrol stop
326 /sbin/chkconfig --del fancontrol
330 %defattr(644,root,root,755)
331 %doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
332 %doc doc/{FAQ,donations,fan-divisors,progs,temperature-sensors,*html,vid}
333 %doc prog/{config,daemon,eepromer/README*,matorb,maxilife}
334 %attr(755,root,root) %{_bindir}/ddcmon
335 %attr(755,root,root) %{_bindir}/decode-*.pl
336 %attr(755,root,root) %{_bindir}/sensors
337 %attr(755,root,root) %{_bindir}/sensors.sh
338 %attr(755,root,root) %{_sbindir}/eeprom*
339 %attr(755,root,root) %{_sbindir}/i2c*
340 %attr(755,root,root) %{_sbindir}/sensors-detect
341 %ifarch %{ix86} %{x8664}
342 %attr(755,root,root) %{_sbindir}/isadump
343 %attr(755,root,root) %{_sbindir}/isaset
344 %{_mandir}/man8/isadump.8*
345 %{_mandir}/man8/isaset.8*
347 %{_mandir}/man1/sensors.1*
348 %{_mandir}/man5/sensors.conf.5*
349 %{_mandir}/man8/i2c*.8*
350 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
352 %files config-default
353 %defattr(644,root,root,755)
354 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
355 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/lib*.so.*.*
362 %defattr(644,root,root,755)
363 %doc doc/{developers,kernel}
364 %attr(755,root,root) %{_libdir}/lib*.so
365 %{_includedir}/sensors
366 %{_includedir}/linux/sensors.h
370 %defattr(644,root,root,755)
371 %{_libdir}/libsensors.a
374 %defattr(644,root,root,755)
375 %attr(754,root,root) %{_sbindir}/sensord
376 %attr(754,root,root) /etc/rc.d/init.d/sensors
377 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
378 %{_mandir}/man8/sensors-detect.8*
379 %{_mandir}/man8/sensord.8*
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_sbindir}/fancontrol
384 %attr(755,root,root) %{_sbindir}/pwmconfig
385 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
386 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
387 %{_mandir}/man8/fancontrol.8*
388 %{_mandir}/man8/pwmconfig.8*