2 # - a big trigger warning how to use fancontrol and to init it first
4 %define ver %(echo %{version} | tr . -)
5 Summary: Hardware health monitoring
6 Summary(pl.UTF-8): Monitor stanu sprzętu
7 Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware
8 Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры
9 Summary(uk.UTF-8): Утиліти для моніторингу апаратури
14 Group: Applications/System
15 Source0: https://github.com/lm-sensors/lm-sensors/archive/V%{ver}/%{name}-%{version}.tar.gz
16 # Source0-md5: 37981f5d3a0f649381529cb41c0f1ff3
18 Source2: sensord.sysconfig
19 Source3: fancontrol.init
20 Source4: fancontrol.sysconfig
22 Source6: lm_sensors.init
23 Source7: lm_sensors.sysconfig
24 Source8: sensord.service
25 Patch0: %{name}-iconv-in-libc.patch
26 Patch1: %{name}-sensors-detect-PATH.patch
27 Patch2: %{name}-make.patch
28 URL: http://www.lm-sensors.org/
30 BuildRequires: flex >= 2.5.1
31 BuildRequires: rpm-perlprov >= 3.0.3-16
32 BuildRequires: rpmbuild(macros) >= 1.647
33 BuildRequires: rrdtool-devel >= 1.2.10
34 Requires(post,preun): /sbin/chkconfig
35 Requires(post,preun,postun): systemd-units >= 38
36 Requires: %{name}-libs = %{version}-%{release}
37 Requires: dev >= 2.9.0-13
38 Requires: rc-scripts >= 0.4.2.8
39 Requires: systemd-units >= 38
40 Requires: uname(release) >= 2.6.5
41 Obsoletes: lm_sensors-config-default
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Tools for monitoring the hardware health of Linux systems containing
46 hardware health monitoring hardware such as the LM78 and LM75.
48 %description -l pl.UTF-8
49 Narzędzie do monitorowania sprzętu w systemach linuksowych
50 wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
52 %description -l pt_BR.UTF-8
53 Ferramentas para monitoração do hardware. Contém uma coleção de
54 módulos para acesso genérico ao barramento SMBus e monitoração de
57 %description -l ru.UTF-8
58 Пакет lm_sensors содержит набор модулей для стандартного доступа к
59 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
60 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
62 %description -l uk.UTF-8
63 Пакет lm_sensors містить набір модулів для стандартного доступу до
64 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
65 яка відсутня у стандартних старих ядрах 2.2.XX!
68 Summary: lm_sensors library
69 Summary(pl.UTF-8): Biblioteka lm_sensors
71 Obsoletes: liblm_sensors1
72 Conflicts: lm_sensors <= 2.9.2-2
77 %description libs -l pl.UTF-8
78 Biblioteka lm_sensors.
81 Summary: Header files for lm_sensors
82 Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
83 Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
84 Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
85 Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
86 Group: Development/Libraries
87 Requires: %{name}-libs = %{version}-%{release}
88 Obsoletes: liblm_sensors1-devel
91 Header files for lm_sensors.
93 %description devel -l pl.UTF-8
94 Pliki nagłówkowe dla lm_sensors.
96 %description devel -l pt_BR.UTF-8
97 Arquivos necessários ao desenvolvimento de programas que usem o
100 %description devel -l ru.UTF-8
101 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
102 построения программ, использующих данные сенсоров.
104 %description devel -l uk.UTF-8
105 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
106 побудови програм, які використовують дані сенсорів.
109 Summary: Static libraries for lm_sensors
110 Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
111 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
112 Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
113 Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
114 Group: Development/Libraries
115 Requires: %{name}-devel = %{version}-%{release}
118 Static libraries for lm_sensors.
120 %description static -l pl.UTF-8
121 Biblioteki statyczne dla lm_sensors.
123 %description static -l pt_BR.UTF-8
124 Bibliotecas estáticas para desenvolvimento com lm_sensors
126 %description static -l ru.UTF-8
127 Пакет lm_sensors-static включает статические библиотеки, необходимые
128 для построения программ, использующих данные сенсоров.
130 %description static -l uk.UTF-8
131 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
132 побудови програм, які використовують дані сенсорів.
135 Summary: Sensord daemon
136 Summary(pl.UTF-8): Demon sensord
138 Requires(post,preun): /sbin/chkconfig
139 #Requires(post,preun,postun): systemd-units >= 38
140 Requires: %{name} = %{version}-%{release}
142 #Requires: systemd-units >= 38
147 %description sensord -l pl.UTF-8
151 Summary: Fancontrol daemon
152 Summary(pl.UTF-8): Demon sterowania wiatraczkami
154 Requires(post,preun): /sbin/chkconfig
155 Requires: %{name} = %{version}-%{release}
156 Requires: %{name}-sensord = %{version}-%{release}
159 %description fancontrol
160 Fancontrol daemon monitors current temperature of the computer and
161 adjusts fans speed acordingly.
163 It is crucial to correctly configure this daemon (via running service
164 fancontrol init) and ensuring, that the temperature levels are set not
165 to burn the insides of the computer!
167 %description fancontrol -l pl.UTF-8
168 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
169 odpowiednio prędkość wiatraków.
171 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
172 uruchomienie service fancontrol init) oraz upewnić się, że progi
173 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
176 %setup -q -n lm-sensors-%{ver}
184 OPTS="%{rpmcflags}" \
186 PROG_EXTRA:="sensord"
189 rm -rf $RPM_BUILD_ROOT
191 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{systemdunitdir}} \
192 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
194 %{__make} user_install \
195 DESTDIR=$RPM_BUILD_ROOT \
197 ETCDIR=%{_sysconfdir} \
200 PROG_EXTRA:="sensord" \
203 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensord
204 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensord
205 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
206 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
207 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
208 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lm_sensors
209 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/lm_sensors
210 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d
212 install -p prog/init/lm_sensors.service $RPM_BUILD_ROOT%{systemdunitdir}
213 install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/sensord.service
216 rm -rf $RPM_BUILD_ROOT
218 %post libs -p /sbin/ldconfig
219 %postun libs -p /sbin/ldconfig
222 if [ -f /var/lock/subsys/sensors_modules ]; then
223 mv -f /var/lock/subsys/sensors_modules /var/lock/subsys/lm_sensors
224 /sbin/chkconfig --del sensors_modules
226 if [ -f /etc/sysconfig/sensors_modules ]; then
227 . /etc/sysconfig/sensors_modules
228 [ -z "$BUS" ] || echo BUS_MODULES=\""$BUS"\" >>/etc/sysconfig/lm_sensors
229 [ -z "$CHIP" ] || echo HWMON_MODULES=\""$CHIP"\" >>/etc/sysconfig/lm_sensors
237 if [ "$1" = 1 ]; then
239 *********************************************************************
242 * You have to configure sensors to match your motherboard sensors *
243 * in /etc/sensors3.conf and /etc/sysconfig/lm_sensors. *
244 * Use sensors-detect script to find proper modules. *
246 *********************************************************************
249 /sbin/chkconfig --add lm_sensors
251 %systemd_post lm_sensors.service
254 if [ "$1" = "0" ]; then
255 %service lm_sensors stop
256 /sbin/chkconfig --del lm_sensors
258 %systemd_preun lm_sensors.service
263 %triggerpostun -- %{name} < 3.3.2-2
264 %systemd_trigger lm_sensors.service
267 if [ -f /var/lock/subsys/sensors ]; then
268 mv -f /var/lock/subsys/sensors /var/lock/subsys/sensord
270 if [ -f /etc/rc.d/init.d/sensors ]; then
271 /sbin/chkconfig --del sensors
273 if [ -f /etc/sysconfig/sensors ]; then
274 cp -a /etc/sysconfig/sensors /etc/sysconfig/sensord
278 /sbin/chkconfig --add sensord
279 %service sensord restart "sensors daemon"
280 %systemd_post sensord.service
283 if [ "$1" = "0" ]; then
284 %service sensord stop
285 /sbin/chkconfig --del sensord
287 %systemd_preun sensord.service
292 %triggerpostun sensord -- %{name}-sensord < 3.3.2-2
293 %systemd_trigger sensord.service
296 if [ "$1" = 1 ]; then
297 echo "You have to configure fancontrol by running service fancontrol init first."
299 /sbin/chkconfig --add fancontrol
300 %service fancontrol restart "fancontrol daemon"
303 if [ "$1" = "0" ]; then
304 %service fancontrol stop
305 /sbin/chkconfig --del fancontrol
309 %defattr(644,root,root,755)
310 %doc CHANGES CONTRIBUTORS README
311 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
313 %attr(755,root,root) %{_bindir}/sensors-conf-convert
314 %attr(755,root,root) %{_bindir}/sensors
315 %attr(755,root,root) %{_bindir}/sensors.sh
316 %attr(755,root,root) %{_sbindir}/sensors-detect
317 %ifarch %{ix86} %{x8664}
318 %attr(755,root,root) %{_sbindir}/isadump
319 %attr(755,root,root) %{_sbindir}/isaset
320 %{_mandir}/man8/isadump.8*
321 %{_mandir}/man8/isaset.8*
323 %{_mandir}/man1/sensors.1*
324 %{_mandir}/man5/sensors.conf.5*
325 %{_mandir}/man5/sensors3.conf.5*
326 %{_mandir}/man8/sensors-conf-convert.8*
327 %{_mandir}/man8/sensors-detect.8*
328 %attr(754,root,root) /etc/rc.d/init.d/lm_sensors
329 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
330 %dir %{_sysconfdir}/sensors.d
331 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lm_sensors
332 %{systemdunitdir}/lm_sensors.service
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
337 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.5
340 %defattr(644,root,root,755)
341 %doc doc/developers doc/libsensors-API.txt
342 %attr(755,root,root) %{_libdir}/libsensors.so
343 %{_includedir}/sensors
344 %{_mandir}/man3/libsensors.3*
347 %defattr(644,root,root,755)
348 %{_libdir}/libsensors.a
351 %defattr(644,root,root,755)
352 %attr(754,root,root) %{_sbindir}/sensord
353 %attr(754,root,root) /etc/rc.d/init.d/sensord
354 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensord
355 %{_mandir}/man8/sensord.8*
356 %{systemdunitdir}/sensord.service
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_sbindir}/fancontrol
361 %attr(755,root,root) %{_sbindir}/pwmconfig
362 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
363 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
364 %{_mandir}/man8/fancontrol.8*
365 %{_mandir}/man8/pwmconfig.8*