2 # - a big trigger warning how to use fancontrol and to init it first
4 %define cmodule /etc/sysconfig/sensors_modules
5 %define cdaemon /etc/sysconfig/sensors
6 %define smodule /etc/rc.d/init.d/sensors_modules
7 %define sdaemon /etc/rc.d/init.d/sensors
9 %include /usr/lib/rpm/macros.perl
10 Summary: Hardware health monitoring
11 Summary(pl.UTF-8): Monitor stanu sprzętu
12 Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware
13 Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры
14 Summary(uk.UTF-8): Утиліти для моніторингу апаратури
19 Group: Applications/System
20 Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
21 # Source0-md5: e23130eaa46c66b861729835e08bdccf
23 Source2: sensors.sysconfig
24 Source3: fancontrol.init
25 Source4: fancontrol.sysconfig
27 Source6: sensors_modules.init
28 Source7: sensors_modules.sysconfig
29 Patch0: %{name}-ppc.patch
30 Patch1: %{name}-iconv-in-libc.patch
31 Patch2: %{name}-sensors-detect-PATH.patch
32 Patch3: %{name}-make.patch
33 URL: http://www.lm-sensors.org/
35 BuildRequires: flex >= 2.5.1
36 BuildRequires: perl-modules >= 1:5.6
37 BuildRequires: rpm-perlprov >= 3.0.3-16
38 BuildRequires: rpmbuild(macros) >= 1.268
39 BuildRequires: rrdtool-devel >= 1.2.10
40 Requires: %{name}-config
41 Requires: %{name}-libs = %{version}-%{release}
42 Requires: dev >= 2.9.0-13
43 Requires: uname(release) >= 2.6.5
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Tools for monitoring the hardware health of Linux systems containing
48 hardware health monitoring hardware such as the LM78 and LM75.
50 %description -l pl.UTF-8
51 Narzędzie do monitorowania sprzętu w systemach linuksowych
52 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
54 %description -l pt_BR.UTF-8
55 Ferramentas para monitoração do hardware. Contém uma coleção de
56 módulos para acesso genérico ao barramento SMBus e monitoração de
59 %description -l ru.UTF-8
60 Пакет lm_sensors содержит набор модулей для стандартного доступа к
61 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
62 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
64 %description -l uk.UTF-8
65 Пакет lm_sensors містить набір модулів для стандартного доступу до
66 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
67 яка відсутня у стандартних старих ядрах 2.2.XX!
70 Summary: lm_sensors library
71 Summary(pl.UTF-8): Biblioteka lm_sensors
73 Obsoletes: liblm_sensors1
74 Conflicts: lm_sensors <= 2.9.2-2
79 %description libs -l pl.UTF-8
80 Biblioteka lm_sensors.
83 Summary: Header files for lm_sensors
84 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
85 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
86 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
87 Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
88 Group: Development/Libraries
89 Requires: %{name}-libs = %{version}-%{release}
90 Obsoletes: liblm_sensors1-devel
93 Header files for lm_sensors.
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe dla lm_sensors.
98 %description devel -l pt_BR.UTF-8
99 Arquivos necessários ao desenvolvimento de programas que usem o
102 %description devel -l ru.UTF-8
103 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
104 построения программ, использующих данные сенсоров.
106 %description devel -l uk.UTF-8
107 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
108 побудови програм, які використовують дані сенсорів.
111 Summary: Static libraries for lm_sensors
112 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
113 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
114 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
115 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
116 Group: Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
120 Static libraries for lm_sensors.
122 %description static -l pl.UTF-8
123 Biblioteki statyczne dla lm_sensors.
125 %description static -l pt_BR.UTF-8
126 Bibliotecas estáticas para desenvolvimento com lm_sensors
128 %description static -l ru.UTF-8
129 Пакет lm_sensors-static включает статические библиотеки, необходимые
130 для построения программ, использующих данные сенсоров.
132 %description static -l uk.UTF-8
133 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
134 побудови програм, які використовують дані сенсорів.
136 %package config-default
137 Summary: Default sensors configuration files
138 Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors
139 Group: Applications/System
140 Requires: %{name} = %{version}-%{release}
141 Provides: %{name}-config
143 %description config-default
144 Default configuration files for lm_sensors.
146 %description config-default -l pl.UTF-8
147 Domyślne pliki konfiguracyjne lm_sensors.
150 Summary: Sensord daemon
151 Summary(pl.UTF-8): Demon sensord
153 Requires(post,preun): /sbin/chkconfig
154 Requires: %{name} = %{version}-%{release}
155 Requires: %{name}-config
161 %description sensord -l pl.UTF-8
165 Summary: Fancontrol daemon
166 Summary(pl.UTF-8): Demon sterowania wiatraczkami
168 Requires(post,preun): /sbin/chkconfig
169 Requires: %{name} = %{version}-%{release}
170 Requires: %{name}-sensord = %{version}-%{release}
173 %description fancontrol
174 Fancontrol daemon monitors current temperature of the computer and
175 adjusts fans speed acordingly.
177 It is crucial to correctly configure this daemon (via running service
178 fancontrol init) and ensuring, that the temperature levels are set not
179 to burn the insides of the computer!
181 %description fancontrol -l pl.UTF-8
182 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
183 odpowiednio prędkość wiatraków.
185 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
186 uruchomienie service fancontrol init) oraz upewnić się, że progi
187 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
199 OPTS="%{rpmcflags}" \
201 PROG_EXTRA:="sensord"
204 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
207 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
209 %{__make} user_install \
210 DESTDIR=$RPM_BUILD_ROOT \
212 ETCDIR=%{_sysconfdir} \
215 PROG_EXTRA:="sensord" \
218 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
219 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
220 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
221 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
222 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
223 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
224 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
227 rm -rf $RPM_BUILD_ROOT
229 %post libs -p /sbin/ldconfig
230 %postun libs -p /sbin/ldconfig
233 if [ -f "%{cmodule}" ]; then
234 /sbin/chkconfig --add sensors_modules
235 %service sensors_modules restart "sensors modules"
236 if [ -f "%{sdaemon}" ]; then
237 /sbin/chkconfig --add sensors
238 %service sensors restart "sensors deamon"
243 if [ "$1" = "0" ]; then
244 if [ -f "%{sdaemon}" ]; then
245 %service sensors stop
246 /sbin/chkconfig --del sensors
248 %service sensors_modules stop
249 /sbin/chkconfig --del sensors_modules
253 if [ "$1" = 1 ]; then
255 *********************************************************************
258 * You have to configure sensors to match your motherboard sensors *
259 * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
260 * sensors-detect script which can help you find proper modules. *
262 *********************************************************************
265 if [ -f "%{smodule}" ]; then
266 /sbin/chkconfig --add sensors_modules
267 %service sensors_modules restart "sensors modules"
269 if [ -f "%{sdaemon}" ]; then
270 /sbin/chkconfig --add sensors
271 %service sensors restart "sensors daemon"
274 %preun config-default
275 if [ "$1" = "0" ]; then
276 if [ -f "%{sdaemon}" ]; then
277 %service sensors stop
278 /sbin/chkconfig --del sensors
280 if [ -f "%{smodule}" ]; then
281 %service sensors_modules stop
282 /sbin/chkconfig --del sensors_modules
287 if [ -f "%{cmodule}" ]; then
288 /sbin/chkconfig --add sensors
289 %service sensors restart "sensors daemon"
293 if [ "$1" = "0" ]; then
294 %service sensors stop
295 /sbin/chkconfig --del sensors
299 if [ "$1" = 1 ]; then
300 echo "You have to configure fancontrol by running service fancontrol init first."
302 /sbin/chkconfig --add fancontrol
303 %service fancontrol restart "fancontrol daemon"
306 if [ "$1" = "0" ]; then
307 %service fancontrol stop
308 /sbin/chkconfig --del fancontrol
312 %defattr(644,root,root,755)
313 %doc CHANGES README doc/chips
314 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
316 %attr(755,root,root) %{_bindir}/sensors-conf-convert
317 %attr(755,root,root) %{_bindir}/sensors
318 %attr(755,root,root) %{_bindir}/sensors.sh
319 %attr(755,root,root) %{_sbindir}/sensors-detect
320 %ifarch %{ix86} %{x8664}
321 %attr(755,root,root) %{_sbindir}/isadump
322 %attr(755,root,root) %{_sbindir}/isaset
323 %{_mandir}/man8/isadump.8*
324 %{_mandir}/man8/isaset.8*
326 %{_mandir}/man1/sensors.1*
327 %{_mandir}/man5/sensors.conf.5*
328 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
330 %files config-default
331 %defattr(644,root,root,755)
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
333 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
341 %defattr(644,root,root,755)
342 %doc doc/developers doc/libsensors-API.txt
343 %attr(755,root,root) %{_libdir}/libsensors.so
344 %{_includedir}/sensors
345 %{_mandir}/man3/libsensors.3*
348 %defattr(644,root,root,755)
349 %{_libdir}/libsensors.a
352 %defattr(644,root,root,755)
353 %attr(754,root,root) %{_sbindir}/sensord
354 %attr(754,root,root) /etc/rc.d/init.d/sensors
355 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
356 %{_mandir}/man8/sensors-detect.8*
357 %{_mandir}/man8/sensord.8*
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_sbindir}/fancontrol
362 %attr(755,root,root) %{_sbindir}/pwmconfig
363 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
364 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
365 %{_mandir}/man8/fancontrol.8*
366 %{_mandir}/man8/pwmconfig.8*