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 BuildRequires: sysfsutils-devel
42 Requires: %{name}-config
43 Requires: %{name}-libs = %{version}-%{release}
44 Requires: dev >= 2.9.0-13
46 Requires: uname(release) >= 2.6.5
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.
53 %description -l pl.UTF-8
54 Narzędzie do monitorowania sprzętu w systemach linuksowych
55 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
57 %description -l pt_BR.UTF-8
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
62 %description -l ru.UTF-8
63 Пакет lm_sensors содержит набор модулей для стандартного доступа к
64 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
65 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
67 %description -l uk.UTF-8
68 Пакет lm_sensors містить набір модулів для стандартного доступу до
69 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
70 яка відсутня у стандартних старих ядрах 2.2.XX!
73 Summary: lm_sensors library
74 Summary(pl.UTF-8): Biblioteka lm_sensors
76 Obsoletes: liblm_sensors1
77 Conflicts: lm_sensors <= 2.9.2-2
82 %description libs -l pl.UTF-8
83 Biblioteka lm_sensors.
86 Summary: Header files for lm_sensors
87 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
88 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
89 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
90 Summary(uk.UTF-8): Файли програміста для програм, які використовують 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.UTF-8
99 Pliki nagłówkowe dla lm_sensors.
101 %description devel -l pt_BR.UTF-8
102 Arquivos necessários ao desenvolvimento de programas que usem o
105 %description devel -l ru.UTF-8
106 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
107 построения программ, использующих данные сенсоров.
109 %description devel -l uk.UTF-8
110 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
111 побудови програм, які використовують дані сенсорів.
114 Summary: Static libraries for lm_sensors
115 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
116 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
117 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
118 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
119 Group: Development/Libraries
120 Requires: %{name}-devel = %{version}-%{release}
123 Static libraries for lm_sensors.
125 %description static -l pl.UTF-8
126 Biblioteki statyczne dla lm_sensors.
128 %description static -l pt_BR.UTF-8
129 Bibliotecas estáticas para desenvolvimento com lm_sensors
131 %description static -l ru.UTF-8
132 Пакет lm_sensors-static включает статические библиотеки, необходимые
133 для построения программ, использующих данные сенсоров.
135 %description static -l uk.UTF-8
136 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
137 побудови програм, які використовують дані сенсорів.
139 %package config-default
140 Summary: Default sensors configuration files
141 Summary(pl.UTF-8): 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.UTF-8
150 Domyślne pliki konfiguracyjne lm_sensors.
153 Summary: Sensord daemon
154 Summary(pl.UTF-8): Demon sensord
156 Requires(post,preun): /sbin/chkconfig
157 Requires: %{name} = %{version}-%{release}
158 Requires: %{name}-config
164 %description sensord -l pl.UTF-8
168 Summary: Fancontrol daemon
169 Summary(pl.UTF-8): 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.UTF-8
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}" \
204 PROG_EXTRA:="sensord"
207 rm -rf $RPM_BUILD_ROOT
209 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
210 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
212 %{__make} user_install \
213 DESTDIR=$RPM_BUILD_ROOT \
215 ETCDIR=%{_sysconfdir} \
218 PROG_EXTRA:="sensord" \
221 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
222 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
223 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
224 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
225 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
226 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
227 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
230 rm -rf $RPM_BUILD_ROOT
232 %post libs -p /sbin/ldconfig
233 %postun libs -p /sbin/ldconfig
236 if [ -f "%{cmodule}" ]; then
237 /sbin/chkconfig --add sensors_modules
238 %service sensors_modules restart "sensors modules"
239 if [ -f "%{sdaemon}" ]; then
240 /sbin/chkconfig --add sensors
241 %service sensors restart "sensors deamon"
246 if [ "$1" = "0" ]; then
247 if [ -f "%{sdaemon}" ]; then
248 %service sensors stop
249 /sbin/chkconfig --del sensors
251 %service sensors_modules stop
252 /sbin/chkconfig --del sensors_modules
256 if [ "$1" = 1 ]; then
258 *********************************************************************
261 * You have to configure sensors to match your motherboard sensors *
262 * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
263 * sensors-detect script which can help you find proper modules. *
265 *********************************************************************
268 if [ -f "%{smodule}" ]; then
269 /sbin/chkconfig --add sensors_modules
270 %service sensors_modules restart "sensors modules"
272 if [ -f "%{sdaemon}" ]; then
273 /sbin/chkconfig --add sensors
274 %service sensors restart "sensors daemon"
277 %preun config-default
278 if [ "$1" = "0" ]; then
279 if [ -f "%{sdaemon}" ]; then
280 %service sensors stop
281 /sbin/chkconfig --del sensors
283 if [ -f "%{smodule}" ]; then
284 %service sensors_modules stop
285 /sbin/chkconfig --del sensors_modules
290 if [ -f "%{cmodule}" ]; then
291 /sbin/chkconfig --add sensors
292 %service sensors restart "sensors daemon"
296 if [ "$1" = "0" ]; then
297 %service sensors stop
298 /sbin/chkconfig --del sensors
302 if [ "$1" = 1 ]; then
303 echo "You have to configure fancontrol by running service fancontrol init first."
305 /sbin/chkconfig --add fancontrol
306 %service fancontrol restart "fancontrol daemon"
309 if [ "$1" = "0" ]; then
310 %service fancontrol stop
311 /sbin/chkconfig --del fancontrol
315 %defattr(644,root,root,755)
316 %doc CHANGES README doc/chips
317 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
318 %doc prog/{daemon,maxilife}
319 %attr(755,root,root) %{_bindir}/sensors-conf-convert
320 %attr(755,root,root) %{_bindir}/sensors
321 %attr(755,root,root) %{_bindir}/sensors.sh
322 %attr(755,root,root) %{_sbindir}/sensors-detect
323 %ifarch %{ix86} %{x8664}
324 %attr(755,root,root) %{_sbindir}/isadump
325 %attr(755,root,root) %{_sbindir}/isaset
326 %{_mandir}/man8/isadump.8*
327 %{_mandir}/man8/isaset.8*
329 %{_mandir}/man1/sensors.1*
330 %{_mandir}/man5/sensors.conf.5*
331 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
333 %files config-default
334 %defattr(644,root,root,755)
335 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
336 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
341 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
344 %defattr(644,root,root,755)
345 %doc doc/developers doc/libsensors-API.txt
346 %attr(755,root,root) %{_libdir}/libsensors.so
347 %{_includedir}/sensors
348 %{_mandir}/man3/libsensors.3*
351 %defattr(644,root,root,755)
352 %{_libdir}/libsensors.a
355 %defattr(644,root,root,755)
356 %attr(754,root,root) %{_sbindir}/sensord
357 %attr(754,root,root) /etc/rc.d/init.d/sensors
358 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
359 %{_mandir}/man8/sensors-detect.8*
360 %{_mandir}/man8/sensord.8*
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_sbindir}/fancontrol
365 %attr(755,root,root) %{_sbindir}/pwmconfig
366 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
367 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
368 %{_mandir}/man8/fancontrol.8*
369 %{_mandir}/man8/pwmconfig.8*