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): Утиліти для моніторингу апаратури
16 <<<<<<< lm_sensors.spec
25 Group: Applications/System
26 <<<<<<< lm_sensors.spec
27 Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
28 # Source0-md5: a7d3c94f1535b060c82a4d52816d4543
30 Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
31 # Source0-md5: e88b236228ac2a50821217015b8fd0fa
34 Source2: sensors.sysconfig
35 Source3: fancontrol.init
36 Source4: fancontrol.sysconfig
38 Source6: sensors_modules.init
39 Source7: sensors_modules.sysconfig
40 Patch0: %{name}-ppc.patch
41 Patch1: %{name}-iconv-in-libc.patch
42 Patch2: %{name}-sensors-detect-PATH.patch
43 Patch3: %{name}-make.patch
44 URL: http://www.lm-sensors.org/
46 BuildRequires: flex >= 2.5.1
47 BuildRequires: perl-modules >= 1:5.6
48 BuildRequires: rpm-perlprov >= 3.0.3-16
49 BuildRequires: rpmbuild(macros) >= 1.268
50 BuildRequires: rrdtool-devel >= 1.2.10
51 Requires: %{name}-config
52 Requires: %{name}-libs = %{version}-%{release}
53 Requires: dev >= 2.9.0-13
54 Requires: uname(release) >= 2.6.5
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Tools for monitoring the hardware health of Linux systems containing
59 hardware health monitoring hardware such as the LM78 and LM75.
61 %description -l pl.UTF-8
62 Narzędzie do monitorowania sprzętu w systemach linuksowych
63 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
65 %description -l pt_BR.UTF-8
66 Ferramentas para monitoração do hardware. Contém uma coleção de
67 módulos para acesso genérico ao barramento SMBus e monitoração de
70 %description -l ru.UTF-8
71 Пакет lm_sensors содержит набор модулей для стандартного доступа к
72 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
73 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
75 %description -l uk.UTF-8
76 Пакет lm_sensors містить набір модулів для стандартного доступу до
77 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
78 яка відсутня у стандартних старих ядрах 2.2.XX!
81 Summary: lm_sensors library
82 Summary(pl.UTF-8): Biblioteka lm_sensors
84 Obsoletes: liblm_sensors1
85 Conflicts: lm_sensors <= 2.9.2-2
90 %description libs -l pl.UTF-8
91 Biblioteka lm_sensors.
94 Summary: Header files for lm_sensors
95 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
96 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
97 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
98 Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
99 Group: Development/Libraries
100 Requires: %{name}-libs = %{version}-%{release}
101 Obsoletes: liblm_sensors1-devel
104 Header files for lm_sensors.
106 %description devel -l pl.UTF-8
107 Pliki nagłówkowe dla lm_sensors.
109 %description devel -l pt_BR.UTF-8
110 Arquivos necessários ao desenvolvimento de programas que usem o
113 %description devel -l ru.UTF-8
114 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
115 построения программ, использующих данные сенсоров.
117 %description devel -l uk.UTF-8
118 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
119 побудови програм, які використовують дані сенсорів.
122 Summary: Static libraries for lm_sensors
123 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
124 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
125 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
126 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
127 Group: Development/Libraries
128 Requires: %{name}-devel = %{version}-%{release}
131 Static libraries for lm_sensors.
133 %description static -l pl.UTF-8
134 Biblioteki statyczne dla lm_sensors.
136 %description static -l pt_BR.UTF-8
137 Bibliotecas estáticas para desenvolvimento com lm_sensors
139 %description static -l ru.UTF-8
140 Пакет lm_sensors-static включает статические библиотеки, необходимые
141 для построения программ, использующих данные сенсоров.
143 %description static -l uk.UTF-8
144 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
145 побудови програм, які використовують дані сенсорів.
147 %package config-default
148 Summary: Default sensors configuration files
149 Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors
150 Group: Applications/System
151 Requires: %{name} = %{version}-%{release}
152 Provides: %{name}-config
154 %description config-default
155 Default configuration files for lm_sensors.
157 %description config-default -l pl.UTF-8
158 Domyślne pliki konfiguracyjne lm_sensors.
161 Summary: Sensord daemon
162 Summary(pl.UTF-8): Demon sensord
164 Requires(post,preun): /sbin/chkconfig
165 Requires: %{name} = %{version}-%{release}
166 Requires: %{name}-config
172 %description sensord -l pl.UTF-8
176 Summary: Fancontrol daemon
177 Summary(pl.UTF-8): Demon sterowania wiatraczkami
179 Requires(post,preun): /sbin/chkconfig
180 Requires: %{name} = %{version}-%{release}
181 Requires: %{name}-sensord = %{version}-%{release}
184 %description fancontrol
185 Fancontrol daemon monitors current temperature of the computer and
186 adjusts fans speed acordingly.
188 It is crucial to correctly configure this daemon (via running service
189 fancontrol init) and ensuring, that the temperature levels are set not
190 to burn the insides of the computer!
192 %description fancontrol -l pl.UTF-8
193 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
194 odpowiednio prędkość wiatraków.
196 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
197 uruchomienie service fancontrol init) oraz upewnić się, że progi
198 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
210 OPTS="%{rpmcflags}" \
212 PROG_EXTRA:="sensord"
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" \
229 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
230 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
231 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
232 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
233 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
234 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
235 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
238 rm -rf $RPM_BUILD_ROOT
240 %post libs -p /sbin/ldconfig
241 %postun libs -p /sbin/ldconfig
244 if [ -f "%{cmodule}" ]; then
245 /sbin/chkconfig --add sensors_modules
246 %service sensors_modules restart "sensors modules"
247 if [ -f "%{sdaemon}" ]; then
248 /sbin/chkconfig --add sensors
249 %service sensors restart "sensors deamon"
254 if [ "$1" = "0" ]; then
255 if [ -f "%{sdaemon}" ]; then
256 %service sensors stop
257 /sbin/chkconfig --del sensors
259 %service sensors_modules stop
260 /sbin/chkconfig --del sensors_modules
264 if [ "$1" = 1 ]; then
266 *********************************************************************
269 * You have to configure sensors to match your motherboard sensors *
270 * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use *
271 * sensors-detect script which can help you find proper modules. *
273 *********************************************************************
276 if [ -f "%{smodule}" ]; then
277 /sbin/chkconfig --add sensors_modules
278 %service sensors_modules restart "sensors modules"
280 if [ -f "%{sdaemon}" ]; then
281 /sbin/chkconfig --add sensors
282 %service sensors restart "sensors daemon"
285 %preun config-default
286 if [ "$1" = "0" ]; then
287 if [ -f "%{sdaemon}" ]; then
288 %service sensors stop
289 /sbin/chkconfig --del sensors
291 if [ -f "%{smodule}" ]; then
292 %service sensors_modules stop
293 /sbin/chkconfig --del sensors_modules
298 if [ -f "%{cmodule}" ]; then
299 /sbin/chkconfig --add sensors
300 %service sensors restart "sensors daemon"
304 if [ "$1" = "0" ]; then
305 %service sensors stop
306 /sbin/chkconfig --del sensors
310 if [ "$1" = 1 ]; then
311 echo "You have to configure fancontrol by running service fancontrol init first."
313 /sbin/chkconfig --add fancontrol
314 %service fancontrol restart "fancontrol daemon"
317 if [ "$1" = "0" ]; then
318 %service fancontrol stop
319 /sbin/chkconfig --del fancontrol
323 %defattr(644,root,root,755)
324 %doc CHANGES README doc/chips
325 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
326 %doc prog/{daemon,maxilife}
327 %attr(755,root,root) %{_bindir}/sensors-conf-convert
328 %attr(755,root,root) %{_bindir}/sensors
329 %attr(755,root,root) %{_bindir}/sensors.sh
330 %attr(755,root,root) %{_sbindir}/sensors-detect
331 %ifarch %{ix86} %{x8664}
332 %attr(755,root,root) %{_sbindir}/isadump
333 %attr(755,root,root) %{_sbindir}/isaset
334 %{_mandir}/man8/isadump.8*
335 %{_mandir}/man8/isaset.8*
337 %{_mandir}/man1/sensors.1*
338 %{_mandir}/man5/sensors.conf.5*
339 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
341 %files config-default
342 %defattr(644,root,root,755)
343 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
344 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
352 %defattr(644,root,root,755)
353 %doc doc/developers doc/libsensors-API.txt
354 %attr(755,root,root) %{_libdir}/libsensors.so
355 %{_includedir}/sensors
356 %{_mandir}/man3/libsensors.3*
359 %defattr(644,root,root,755)
360 %{_libdir}/libsensors.a
363 %defattr(644,root,root,755)
364 %attr(754,root,root) %{_sbindir}/sensord
365 %attr(754,root,root) /etc/rc.d/init.d/sensors
366 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
367 %{_mandir}/man8/sensors-detect.8*
368 %{_mandir}/man8/sensord.8*
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_sbindir}/fancontrol
373 %attr(755,root,root) %{_sbindir}/pwmconfig
374 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
375 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
376 %{_mandir}/man8/fancontrol.8*
377 %{_mandir}/man8/pwmconfig.8*