2 # - a big trigger warning how to use fancontrol and to init it first
4 %include /usr/lib/rpm/macros.perl
5 %define ver %(echo '%version'|tr . -)
6 Summary: Hardware health monitoring
7 Summary(pl.UTF-8): Monitor stanu sprzętu
8 Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware
9 Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры
10 Summary(uk.UTF-8): Утиліти для моніторингу апаратури
15 Group: Applications/System
16 Source0: https://github.com/lm-sensors/lm-sensors/archive/V%{ver}.tar.gz
17 # Source0-md5: 37981f5d3a0f649381529cb41c0f1ff3
19 Source2: sensord.sysconfig
20 Source3: fancontrol.init
21 Source4: fancontrol.sysconfig
23 Source6: lm_sensors.init
24 Source7: lm_sensors.sysconfig
25 Source8: sensord.service
26 Patch0: %{name}-iconv-in-libc.patch
27 Patch1: %{name}-sensors-detect-PATH.patch
28 Patch2: %{name}-make.patch
29 URL: http://www.lm-sensors.org/
31 BuildRequires: flex >= 2.5.1
32 BuildRequires: rpm-perlprov >= 3.0.3-16
33 BuildRequires: rpmbuild(macros) >= 1.647
34 BuildRequires: rrdtool-devel >= 1.2.10
35 Requires(post,preun): /sbin/chkconfig
36 Requires(post,preun,postun): systemd-units >= 38
37 Requires: %{name}-libs = %{version}-%{release}
38 Requires: dev >= 2.9.0-13
39 Requires: rc-scripts >= 0.4.2.8
40 Requires: systemd-units >= 38
41 Requires: uname(release) >= 2.6.5
42 Obsoletes: lm_sensors-config-default
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Tools for monitoring the hardware health of Linux systems containing
47 hardware health monitoring hardware such as the LM78 and LM75.
49 %description -l pl.UTF-8
50 Narzędzie do monitorowania sprzętu w systemach linuksowych
51 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
53 %description -l pt_BR.UTF-8
54 Ferramentas para monitoração do hardware. Contém uma coleção de
55 módulos para acesso genérico ao barramento SMBus e monitoração de
58 %description -l ru.UTF-8
59 Пакет lm_sensors содержит набор модулей для стандартного доступа к
60 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
61 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
63 %description -l uk.UTF-8
64 Пакет lm_sensors містить набір модулів для стандартного доступу до
65 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
66 яка відсутня у стандартних старих ядрах 2.2.XX!
69 Summary: lm_sensors library
70 Summary(pl.UTF-8): Biblioteka lm_sensors
72 Obsoletes: liblm_sensors1
73 Conflicts: lm_sensors <= 2.9.2-2
78 %description libs -l pl.UTF-8
79 Biblioteka lm_sensors.
82 Summary: Header files for lm_sensors
83 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
84 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
85 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
86 Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
87 Group: Development/Libraries
88 Requires: %{name}-libs = %{version}-%{release}
89 Obsoletes: liblm_sensors1-devel
92 Header files for lm_sensors.
94 %description devel -l pl.UTF-8
95 Pliki nagłówkowe dla lm_sensors.
97 %description devel -l pt_BR.UTF-8
98 Arquivos necessários ao desenvolvimento de programas que usem o
101 %description devel -l ru.UTF-8
102 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
103 построения программ, использующих данные сенсоров.
105 %description devel -l uk.UTF-8
106 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
107 побудови програм, які використовують дані сенсорів.
110 Summary: Static libraries for lm_sensors
111 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
112 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
113 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
114 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
115 Group: Development/Libraries
116 Requires: %{name}-devel = %{version}-%{release}
119 Static libraries for lm_sensors.
121 %description static -l pl.UTF-8
122 Biblioteki statyczne dla lm_sensors.
124 %description static -l pt_BR.UTF-8
125 Bibliotecas estáticas para desenvolvimento com lm_sensors
127 %description static -l ru.UTF-8
128 Пакет lm_sensors-static включает статические библиотеки, необходимые
129 для построения программ, использующих данные сенсоров.
131 %description static -l uk.UTF-8
132 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
133 побудови програм, які використовують дані сенсорів.
136 Summary: Sensord daemon
137 Summary(pl.UTF-8): Demon sensord
139 Requires(post,preun): /sbin/chkconfig
140 #Requires(post,preun,postun): systemd-units >= 38
141 Requires: %{name} = %{version}-%{release}
143 #Requires: systemd-units >= 38
148 %description sensord -l pl.UTF-8
152 Summary: Fancontrol daemon
153 Summary(pl.UTF-8): Demon sterowania wiatraczkami
155 Requires(post,preun): /sbin/chkconfig
156 Requires: %{name} = %{version}-%{release}
157 Requires: %{name}-sensord = %{version}-%{release}
160 %description fancontrol
161 Fancontrol daemon monitors current temperature of the computer and
162 adjusts fans speed acordingly.
164 It is crucial to correctly configure this daemon (via running service
165 fancontrol init) and ensuring, that the temperature levels are set not
166 to burn the insides of the computer!
168 %description fancontrol -l pl.UTF-8
169 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
170 odpowiednio prędkość wiatraków.
172 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
173 uruchomienie service fancontrol init) oraz upewnić się, że progi
174 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
177 %setup -q -n lm-sensors-%{ver}
185 OPTS="%{rpmcflags}" \
187 PROG_EXTRA:="sensord"
190 rm -rf $RPM_BUILD_ROOT
192 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{systemdunitdir}} \
193 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
195 %{__make} user_install \
196 DESTDIR=$RPM_BUILD_ROOT \
198 ETCDIR=%{_sysconfdir} \
201 PROG_EXTRA:="sensord" \
204 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensord
205 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensord
206 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
207 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
208 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
209 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lm_sensors
210 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/lm_sensors
211 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d
213 install -p prog/init/lm_sensors.service $RPM_BUILD_ROOT%{systemdunitdir}
214 install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/sensord.service
217 rm -rf $RPM_BUILD_ROOT
219 %post libs -p /sbin/ldconfig
220 %postun libs -p /sbin/ldconfig
223 if [ -f /var/lock/subsys/sensors_modules ]; then
224 mv -f /var/lock/subsys/sensors_modules /var/lock/subsys/lm_sensors
225 /sbin/chkconfig --del sensors_modules
227 if [ -f /etc/sysconfig/sensors_modules ]; then
228 . /etc/sysconfig/sensors_modules
229 [ -z "$BUS" ] || echo BUS_MODULES=\""$BUS"\" >>/etc/sysconfig/lm_sensors
230 [ -z "$CHIP" ] || echo HWMON_MODULES=\""$CHIP"\" >>/etc/sysconfig/lm_sensors
238 if [ "$1" = 1 ]; then
240 *********************************************************************
243 * You have to configure sensors to match your motherboard sensors *
244 * in /etc/sensors3.conf and /etc/sysconfig/lm_sensors. *
245 * Use sensors-detect script to find proper modules. *
247 *********************************************************************
250 /sbin/chkconfig --add lm_sensors
252 %systemd_post lm_sensors.service
255 if [ "$1" = "0" ]; then
256 %service lm_sensors stop
257 /sbin/chkconfig --del lm_sensors
259 %systemd_preun lm_sensors.service
264 %triggerpostun -- %{name} < 3.3.2-2
265 %systemd_trigger lm_sensors.service
268 if [ -f /var/lock/subsys/sensors ]; then
269 mv -f /var/lock/subsys/sensors /var/lock/subsys/sensord
271 if [ -f /etc/rc.d/init.d/sensors ]; then
272 /sbin/chkconfig --del sensors
274 if [ -f /etc/sysconfig/sensors ]; then
275 cp -a /etc/sysconfig/sensors /etc/sysconfig/sensord
279 /sbin/chkconfig --add sensord
280 %service sensord restart "sensors daemon"
281 %systemd_post sensord.service
284 if [ "$1" = "0" ]; then
285 %service sensord stop
286 /sbin/chkconfig --del sensord
288 %systemd_preun sensord.service
293 %triggerpostun sensord -- %{name}-sensord < 3.3.2-2
294 %systemd_trigger sensord.service
297 if [ "$1" = 1 ]; then
298 echo "You have to configure fancontrol by running service fancontrol init first."
300 /sbin/chkconfig --add fancontrol
301 %service fancontrol restart "fancontrol daemon"
304 if [ "$1" = "0" ]; then
305 %service fancontrol stop
306 /sbin/chkconfig --del fancontrol
310 %defattr(644,root,root,755)
311 %doc CHANGES CONTRIBUTORS README
312 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
314 %attr(755,root,root) %{_bindir}/sensors-conf-convert
315 %attr(755,root,root) %{_bindir}/sensors
316 %attr(755,root,root) %{_bindir}/sensors.sh
317 %attr(755,root,root) %{_sbindir}/sensors-detect
318 %ifarch %{ix86} %{x8664}
319 %attr(755,root,root) %{_sbindir}/isadump
320 %attr(755,root,root) %{_sbindir}/isaset
321 %{_mandir}/man8/isadump.8*
322 %{_mandir}/man8/isaset.8*
324 %{_mandir}/man1/sensors.1*
325 %{_mandir}/man5/sensors.conf.5*
326 %{_mandir}/man5/sensors3.conf.5*
327 %{_mandir}/man8/sensors-conf-convert.8*
328 %{_mandir}/man8/sensors-detect.8*
329 %attr(754,root,root) /etc/rc.d/init.d/lm_sensors
330 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
331 %dir %{_sysconfdir}/sensors.d
332 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lm_sensors
333 %{systemdunitdir}/lm_sensors.service
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.5
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/sensord
355 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensord
356 %{_mandir}/man8/sensord.8*
357 %{systemdunitdir}/sensord.service
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*