2 # - package i2c-tools (eeprom*, i2c* etc.)
3 # - a big trigger warning how to use fancontrol and to init it first
5 %define cmodule /etc/sysconfig/sensors_modules
6 %define cdaemon /etc/sysconfig/sensors
7 %define smodule /etc/rc.d/init.d/sensors_modules
8 %define sdaemon /etc/rc.d/init.d/sensors
10 %include /usr/lib/rpm/macros.perl
11 Summary: Hardware health monitoring
12 Summary(pl.UTF-8): Monitor stanu sprzętu
13 Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware
14 Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры
15 Summary(uk.UTF-8): Утиліти для моніторингу апаратури
20 Group: Applications/System
21 Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
22 # Source0-md5: 5b210ba9cc01f00161c438fd618484e5
24 Source2: sensors.sysconfig
25 Source3: fancontrol.init
26 Source4: fancontrol.sysconfig
28 Source6: sensors_modules.init
29 Source7: sensors_modules.sysconfig
30 Patch0: %{name}-ppc.patch
31 Patch1: %{name}-iconv-in-libc.patch
32 Patch2: %{name}-sensors-detect-PATH.patch
33 Patch3: %{name}-make.patch
34 URL: http://www.lm-sensors.org/
36 BuildRequires: flex >= 2.5.1
37 BuildRequires: perl-modules >= 1:5.6
38 BuildRequires: rpm-perlprov >= 3.0.3-16
39 BuildRequires: rpmbuild(macros) >= 1.268
40 BuildRequires: rrdtool-devel >= 1.2.10
41 Requires: %{name}-config
42 Requires: %{name}-libs = %{version}-%{release}
43 Requires: dev >= 2.9.0-13
45 Requires: uname(release) >= 2.6.5
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Tools for monitoring the hardware health of Linux systems containing
50 hardware health monitoring hardware such as the LM78 and LM75.
52 %description -l pl.UTF-8
53 Narzędzie do monitorowania sprzętu w systemach linuksowych
54 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
56 %description -l pt_BR.UTF-8
57 Ferramentas para monitoração do hardware. Contém uma coleção de
58 módulos para acesso genérico ao barramento SMBus e monitoração de
61 %description -l ru.UTF-8
62 Пакет lm_sensors содержит набор модулей для стандартного доступа к
63 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
64 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
66 %description -l uk.UTF-8
67 Пакет lm_sensors містить набір модулів для стандартного доступу до
68 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
69 яка відсутня у стандартних старих ядрах 2.2.XX!
72 Summary: lm_sensors library
73 Summary(pl.UTF-8): Biblioteka lm_sensors
75 Obsoletes: liblm_sensors1
76 Conflicts: lm_sensors <= 2.9.2-2
81 %description libs -l pl.UTF-8
82 Biblioteka lm_sensors.
85 Summary: Header files for lm_sensors
86 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
87 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
88 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
89 Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
90 Group: Development/Libraries
91 Requires: %{name}-libs = %{version}-%{release}
92 Obsoletes: liblm_sensors1-devel
95 Header files for lm_sensors.
97 %description devel -l pl.UTF-8
98 Pliki nagłówkowe dla lm_sensors.
100 %description devel -l pt_BR.UTF-8
101 Arquivos necessários ao desenvolvimento de programas que usem o
104 %description devel -l ru.UTF-8
105 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
106 построения программ, использующих данные сенсоров.
108 %description devel -l uk.UTF-8
109 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
110 побудови програм, які використовують дані сенсорів.
113 Summary: Static libraries for lm_sensors
114 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
115 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
116 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
117 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
118 Group: Development/Libraries
119 Requires: %{name}-devel = %{version}-%{release}
122 Static libraries for lm_sensors.
124 %description static -l pl.UTF-8
125 Biblioteki statyczne dla lm_sensors.
127 %description static -l pt_BR.UTF-8
128 Bibliotecas estáticas para desenvolvimento com lm_sensors
130 %description static -l ru.UTF-8
131 Пакет lm_sensors-static включает статические библиотеки, необходимые
132 для построения программ, использующих данные сенсоров.
134 %description static -l uk.UTF-8
135 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
136 побудови програм, які використовують дані сенсорів.
138 %package config-default
139 Summary: Default sensors configuration files
140 Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors
141 Group: Applications/System
142 Requires: %{name} = %{version}-%{release}
143 Provides: %{name}-config
145 %description config-default
146 Default configuration files for lm_sensors.
148 %description config-default -l pl.UTF-8
149 Domyślne pliki konfiguracyjne lm_sensors.
152 Summary: Sensord daemon
153 Summary(pl.UTF-8): Demon sensord
155 Requires(post,preun): /sbin/chkconfig
156 Requires: %{name} = %{version}-%{release}
157 Requires: %{name}-config
163 %description sensord -l pl.UTF-8
167 Summary: Fancontrol daemon
168 Summary(pl.UTF-8): Demon sterowania wiatraczkami
170 Requires(post,preun): /sbin/chkconfig
171 Requires: %{name} = %{version}-%{release}
172 Requires: %{name}-sensord = %{version}-%{release}
175 %description fancontrol
176 Fancontrol daemon monitors current temperature of the computer and
177 adjusts fans speed acordingly.
179 It is crucial to correctly configure this daemon (via running service
180 fancontrol init) and ensuring, that the temperature levels are set not
181 to burn the insides of the computer!
183 %description fancontrol -l pl.UTF-8
184 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
185 odpowiednio prędkość wiatraków.
187 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
188 uruchomienie service fancontrol init) oraz upewnić się, że progi
189 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
201 OPTS="%{rpmcflags}" \
203 PROG_EXTRA:="sensord"
206 rm -rf $RPM_BUILD_ROOT
208 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
209 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
211 %{__make} user_install \
212 DESTDIR=$RPM_BUILD_ROOT \
214 ETCDIR=%{_sysconfdir} \
217 PROG_EXTRA:="sensord" \
220 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
221 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
222 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
223 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
224 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
225 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
226 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
229 rm -rf $RPM_BUILD_ROOT
231 %post libs -p /sbin/ldconfig
232 %postun libs -p /sbin/ldconfig
235 if [ -f "%{cmodule}" ]; then
236 /sbin/chkconfig --add sensors_modules
237 %service sensors_modules restart "sensors modules"
238 if [ -f "%{sdaemon}" ]; then
239 /sbin/chkconfig --add sensors
240 %service sensors restart "sensors deamon"
245 if [ "$1" = "0" ]; then
246 if [ -f "%{sdaemon}" ]; then
247 %service sensors stop
248 /sbin/chkconfig --del sensors
250 %service sensors_modules stop
251 /sbin/chkconfig --del sensors_modules
255 if [ "$1" = 1 ]; then
257 *********************************************************************
260 * You have to configure sensors to match your motherboard sensors *
261 * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
262 * sensors-detect script which can help you find proper modules. *
264 *********************************************************************
267 if [ -f "%{smodule}" ]; then
268 /sbin/chkconfig --add sensors_modules
269 %service sensors_modules restart "sensors modules"
271 if [ -f "%{sdaemon}" ]; then
272 /sbin/chkconfig --add sensors
273 %service sensors restart "sensors daemon"
276 %preun config-default
277 if [ "$1" = "0" ]; then
278 if [ -f "%{sdaemon}" ]; then
279 %service sensors stop
280 /sbin/chkconfig --del sensors
282 if [ -f "%{smodule}" ]; then
283 %service sensors_modules stop
284 /sbin/chkconfig --del sensors_modules
289 if [ -f "%{cmodule}" ]; then
290 /sbin/chkconfig --add sensors
291 %service sensors restart "sensors daemon"
295 if [ "$1" = "0" ]; then
296 %service sensors stop
297 /sbin/chkconfig --del sensors
301 if [ "$1" = 1 ]; then
302 echo "You have to configure fancontrol by running service fancontrol init first."
304 /sbin/chkconfig --add fancontrol
305 %service fancontrol restart "fancontrol daemon"
308 if [ "$1" = "0" ]; then
309 %service fancontrol stop
310 /sbin/chkconfig --del fancontrol
314 %defattr(644,root,root,755)
315 %doc CHANGES README doc/chips
316 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
317 %doc prog/{daemon,maxilife}
318 %attr(755,root,root) %{_bindir}/sensors-conf-convert
319 %attr(755,root,root) %{_bindir}/sensors
320 %attr(755,root,root) %{_bindir}/sensors.sh
321 %attr(755,root,root) %{_sbindir}/sensors-detect
322 %ifarch %{ix86} %{x8664}
323 %attr(755,root,root) %{_sbindir}/isadump
324 %attr(755,root,root) %{_sbindir}/isaset
325 %{_mandir}/man8/isadump.8*
326 %{_mandir}/man8/isaset.8*
328 %{_mandir}/man1/sensors.1*
329 %{_mandir}/man5/sensors.conf.5*
330 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
332 %files config-default
333 %defattr(644,root,root,755)
334 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
335 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
340 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
343 %defattr(644,root,root,755)
344 %doc doc/developers doc/libsensors-API.txt
345 %attr(755,root,root) %{_libdir}/libsensors.so
346 %{_includedir}/sensors
347 %{_mandir}/man3/libsensors.3*
350 %defattr(644,root,root,755)
351 %{_libdir}/libsensors.a
354 %defattr(644,root,root,755)
355 %attr(754,root,root) %{_sbindir}/sensord
356 %attr(754,root,root) /etc/rc.d/init.d/sensors
357 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
358 %{_mandir}/man8/sensors-detect.8*
359 %{_mandir}/man8/sensord.8*
362 %defattr(644,root,root,755)
363 %attr(755,root,root) %{_sbindir}/fancontrol
364 %attr(755,root,root) %{_sbindir}/pwmconfig
365 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
366 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
367 %{_mandir}/man8/fancontrol.8*
368 %{_mandir}/man8/pwmconfig.8*