]>
Commit | Line | Data |
---|---|---|
e2443105 | 1 | # TODO |
af18d423 | 2 | # - a big trigger warning how to use fancontrol and to init it first |
d0e4e449 | 3 | # |
641e1732 | 4 | %define ver %(echo %{version} | tr . -) |
f81a7b63 | 5 | Summary: Hardware health monitoring |
eff90cd1 ER |
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): Утиліти для моніторингу апаратури | |
f81a7b63 | 10 | Name: lm_sensors |
b5ab3a64 JB |
11 | Version: 3.6.0 |
12 | Release: 1 | |
283f7a60 | 13 | License: GPL v2+ |
f84e5d52 | 14 | Group: Applications/System |
b5ab3a64 | 15 | #Source0Download: https://github.com/lm-sensors/lm-sensors/tags |
ea1be10c | 16 | Source0: https://github.com/lm-sensors/lm-sensors/archive/V%{ver}/%{name}-%{version}.tar.gz |
b5ab3a64 | 17 | # Source0-md5: f60e47b5eb50bbeed48a9f43bb08dd5e |
0183aefa JR |
18 | Source1: sensord.init |
19 | Source2: sensord.sysconfig | |
af18d423 | 20 | Source3: fancontrol.init |
97e0f454 | 21 | Source4: fancontrol.sysconfig |
e3a25e26 | 22 | Source5: sensors.sh |
0183aefa JR |
23 | Source6: lm_sensors.init |
24 | Source7: lm_sensors.sysconfig | |
c605ce11 | 25 | Source8: sensord.service |
1cb1d544 | 26 | Patch0: %{name}-iconv-in-libc.patch |
b5ab3a64 | 27 | Patch1: %{name}-make.patch |
d47b13e2 | 28 | URL: https://hwmon.wiki.kernel.org/lm_sensors |
ad983b5b | 29 | BuildRequires: bison |
790b55e5 | 30 | BuildRequires: flex >= 2.5.1 |
3f4f34e5 | 31 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
d47b13e2 | 32 | BuildRequires: rpmbuild(macros) >= 1.745 |
4e754930 | 33 | BuildRequires: rrdtool-devel >= 1.2.10 |
c605ce11 JR |
34 | Requires(post,preun): /sbin/chkconfig |
35 | Requires(post,preun,postun): systemd-units >= 38 | |
99c4f992 | 36 | Requires: %{name}-libs = %{version}-%{release} |
c1be19b1 | 37 | Requires: dev >= 2.9.0-13 |
b25344ea | 38 | Requires: rc-scripts >= 0.4.2.8 |
c605ce11 | 39 | Requires: systemd-units >= 38 |
205426ad | 40 | Requires: uname(release) >= 2.6.5 |
b5ab3a64 | 41 | Obsoletes: lm_sensors-config-default < 3.3.2-2 |
c1be19b1 | 42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
bdcd6c23 | 43 | |
bdcd6c23 | 44 | %description |
f81a7b63 | 45 | Tools for monitoring the hardware health of Linux systems containing |
46 | hardware health monitoring hardware such as the LM78 and LM75. | |
bdcd6c23 | 47 | |
090657ea JR |
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. | |
e81a4f46 | 51 | |
090657ea JR |
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 | |
c75e4a6b | 55 | hardware. |
56 | ||
090657ea JR |
57 | %description -l ru.UTF-8 |
58 | Пакет lm_sensors содержит набор модулей для стандартного доступа к | |
59 | SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная | |
60 | поддержка, отсутствующая в стандартных старых ядрах 2.2.XX! | |
ff19563a | 61 | |
090657ea JR |
62 | %description -l uk.UTF-8 |
63 | Пакет lm_sensors містить набір модулів для стандартного доступу до | |
64 | SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка, | |
65 | яка відсутня у стандартних старих ядрах 2.2.XX! | |
ff19563a | 66 | |
e2443105 ER |
67 | %package libs |
68 | Summary: lm_sensors library | |
eff90cd1 | 69 | Summary(pl.UTF-8): Biblioteka lm_sensors |
e2443105 | 70 | Group: Libraries |
b5ab3a64 | 71 | Obsoletes: liblm_sensors1 < 3 |
c7a3989d | 72 | Conflicts: lm_sensors <= 2.9.2-2 |
e2443105 ER |
73 | |
74 | %description libs | |
75 | lm_sensors library. | |
76 | ||
090657ea | 77 | %description libs -l pl.UTF-8 |
b6d585f3 JB |
78 | Biblioteka lm_sensors. |
79 | ||
e81a4f46 | 80 | %package devel |
f84e5d52 | 81 | Summary: Header files for lm_sensors |
eff90cd1 ER |
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 | |
f84e5d52 | 86 | Group: Development/Libraries |
e2443105 | 87 | Requires: %{name}-libs = %{version}-%{release} |
b5ab3a64 | 88 | Obsoletes: liblm_sensors1-devel < 3 |
e81a4f46 | 89 | |
90 | %description devel | |
91 | Header files for lm_sensors. | |
92 | ||
090657ea JR |
93 | %description devel -l pl.UTF-8 |
94 | Pliki nagłówkowe dla lm_sensors. | |
e81a4f46 | 95 | |
090657ea JR |
96 | %description devel -l pt_BR.UTF-8 |
97 | Arquivos necessários ao desenvolvimento de programas que usem o | |
c75e4a6b | 98 | lm_sensors. |
99 | ||
090657ea JR |
100 | %description devel -l ru.UTF-8 |
101 | Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для | |
102 | построения программ, использующих данные сенсоров. | |
ff19563a | 103 | |
090657ea JR |
104 | %description devel -l uk.UTF-8 |
105 | Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для | |
106 | побудови програм, які використовують дані сенсорів. | |
ff19563a | 107 | |
e81a4f46 | 108 | %package static |
109 | Summary: Static libraries for lm_sensors | |
eff90cd1 ER |
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 | |
f84e5d52 | 114 | Group: Development/Libraries |
7b7664e5 | 115 | Requires: %{name}-devel = %{version}-%{release} |
e81a4f46 | 116 | |
117 | %description static | |
033e04f4 | 118 | Static libraries for lm_sensors. |
e81a4f46 | 119 | |
090657ea | 120 | %description static -l pl.UTF-8 |
e81a4f46 | 121 | Biblioteki statyczne dla lm_sensors. |
122 | ||
090657ea JR |
123 | %description static -l pt_BR.UTF-8 |
124 | Bibliotecas estáticas para desenvolvimento com lm_sensors | |
c75e4a6b | 125 | |
090657ea JR |
126 | %description static -l ru.UTF-8 |
127 | Пакет lm_sensors-static включает статические библиотеки, необходимые | |
128 | для построения программ, использующих данные сенсоров. | |
ff19563a | 129 | |
090657ea JR |
130 | %description static -l uk.UTF-8 |
131 | Пакет lm_sensors-static містить статичні бібліотеки, необхідні для | |
132 | побудови програм, які використовують дані сенсорів. | |
ff19563a | 133 | |
054d3984 JB |
134 | %package sensord |
135 | Summary: Sensord daemon | |
eff90cd1 | 136 | Summary(pl.UTF-8): Demon sensord |
054d3984 | 137 | Group: Daemons |
054d3984 | 138 | Requires(post,preun): /sbin/chkconfig |
c605ce11 | 139 | #Requires(post,preun,postun): systemd-units >= 38 |
054d3984 | 140 | Requires: %{name} = %{version}-%{release} |
4428b1ee | 141 | Requires: rc-scripts |
c605ce11 | 142 | #Requires: systemd-units >= 38 |
054d3984 JB |
143 | |
144 | %description sensord | |
145 | Sensord daemon. | |
146 | ||
090657ea | 147 | %description sensord -l pl.UTF-8 |
054d3984 JB |
148 | Demon sensord. |
149 | ||
97e0f454 | 150 | %package fancontrol |
151 | Summary: Fancontrol daemon | |
eff90cd1 | 152 | Summary(pl.UTF-8): Demon sterowania wiatraczkami |
97e0f454 | 153 | Group: Daemons |
154 | Requires(post,preun): /sbin/chkconfig | |
155 | Requires: %{name} = %{version}-%{release} | |
156 | Requires: %{name}-sensord = %{version}-%{release} | |
157 | Requires: rc-scripts | |
158 | ||
159 | %description fancontrol | |
160 | Fancontrol daemon monitors current temperature of the computer and | |
161 | adjusts fans speed acordingly. | |
162 | ||
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! | |
166 | ||
090657ea JR |
167 | %description fancontrol -l pl.UTF-8 |
168 | Demon fancontrol monitoruje obecną temperaturę komputera i ustawia | |
169 | odpowiednio prędkość wiatraków. | |
97e0f454 | 170 | |
090657ea JR |
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! | |
97e0f454 | 174 | |
bdcd6c23 | 175 | %prep |
1cb1d544 | 176 | %setup -q -n lm-sensors-%{ver} |
b65b31e0 | 177 | %patch0 -p1 |
02239be8 | 178 | %patch1 -p1 |
e81a4f46 | 179 | |
bdcd6c23 | 180 | %build |
23e4eeda JB |
181 | %{__make} user \ |
182 | CC="%{__cc}" \ | |
183 | OPTS="%{rpmcflags}" \ | |
73e058e8 | 184 | SYSFS_SUPPORT:=1 \ |
8f786de3 | 185 | PROG_EXTRA:="sensord" |
0227b80e | 186 | |
bdcd6c23 | 187 | %install |
f84e5d52 | 188 | rm -rf $RPM_BUILD_ROOT |
23e4eeda | 189 | |
c605ce11 | 190 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{systemdunitdir}} \ |
f2004a5e | 191 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
e81a4f46 | 192 | |
23e4eeda | 193 | %{__make} user_install \ |
215f8be6 | 194 | DESTDIR=$RPM_BUILD_ROOT \ |
195 | PREFIX=%{_prefix} \ | |
196 | ETCDIR=%{_sysconfdir} \ | |
fe7fef09 | 197 | LIBDIR=%{_libdir} \ |
215f8be6 | 198 | MANDIR=%{_mandir} \ |
fe7fef09 | 199 | PROG_EXTRA:="sensord" \ |
73e058e8 | 200 | SYSFS_SUPPORT:=1 |
f17d9868 | 201 | |
0183aefa JR |
202 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensord |
203 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensord | |
f2004a5e JB |
204 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol |
205 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol | |
e3a25e26 | 206 | install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir} |
0183aefa JR |
207 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lm_sensors |
208 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/lm_sensors | |
07943d95 | 209 | install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d |
125c799a | 210 | |
c605ce11 JR |
211 | install -p prog/init/lm_sensors.service $RPM_BUILD_ROOT%{systemdunitdir} |
212 | install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/sensord.service | |
213 | ||
a70edc8b JB |
214 | %clean |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
e2443105 ER |
217 | %post libs -p /sbin/ldconfig |
218 | %postun libs -p /sbin/ldconfig | |
34be5856 | 219 | |
0183aefa JR |
220 | %pre |
221 | if [ -f /var/lock/subsys/sensors_modules ]; then | |
222 | mv -f /var/lock/subsys/sensors_modules /var/lock/subsys/lm_sensors | |
e3a25e26 | 223 | /sbin/chkconfig --del sensors_modules |
224 | fi | |
0183aefa JR |
225 | if [ -f /etc/sysconfig/sensors_modules ]; then |
226 | . /etc/sysconfig/sensors_modules | |
227 | [ -z "$BUS" ] || echo BUS_MODULES=\""$BUS"\" >>/etc/sysconfig/lm_sensors | |
228 | [ -z "$CHIP" ] || echo HWMON_MODULES=\""$CHIP"\" >>/etc/sysconfig/lm_sensors | |
229 | fi | |
230 | ||
231 | %if 0 | |
232 | #" | |
233 | %endif | |
e3a25e26 | 234 | |
0183aefa | 235 | %post |
4428b1ee | 236 | if [ "$1" = 1 ]; then |
e3a25e26 | 237 | cat << EOF |
238 | ********************************************************************* | |
239 | * * | |
240 | * NOTE: * | |
241 | * You have to configure sensors to match your motherboard sensors * | |
0183aefa JR |
242 | * in /etc/sensors3.conf and /etc/sysconfig/lm_sensors. * |
243 | * Use sensors-detect script to find proper modules. * | |
e3a25e26 | 244 | * * |
245 | ********************************************************************* | |
246 | EOF | |
247 | fi | |
0183aefa | 248 | /sbin/chkconfig --add lm_sensors |
c605ce11 JR |
249 | NORESTART=1 |
250 | %systemd_post lm_sensors.service | |
e3a25e26 | 251 | |
0183aefa | 252 | %preun |
e3a25e26 | 253 | if [ "$1" = "0" ]; then |
0183aefa JR |
254 | %service lm_sensors stop |
255 | /sbin/chkconfig --del lm_sensors | |
e3a25e26 | 256 | fi |
c605ce11 JR |
257 | %systemd_preun lm_sensors.service |
258 | ||
259 | %postun | |
260 | %systemd_reload | |
261 | ||
262 | %triggerpostun -- %{name} < 3.3.2-2 | |
263 | %systemd_trigger lm_sensors.service | |
e3a25e26 | 264 | |
0183aefa JR |
265 | %pre sensord |
266 | if [ -f /var/lock/subsys/sensors ]; then | |
267 | mv -f /var/lock/subsys/sensors /var/lock/subsys/sensord | |
268 | fi | |
269 | if [ -f /etc/rc.d/init.d/sensors ]; then | |
270 | /sbin/chkconfig --del sensors | |
21553339 | 271 | fi |
0183aefa JR |
272 | if [ -f /etc/sysconfig/sensors ]; then |
273 | cp -a /etc/sysconfig/sensors /etc/sysconfig/sensord | |
274 | fi | |
275 | ||
276 | %post sensord | |
277 | /sbin/chkconfig --add sensord | |
278 | %service sensord restart "sensors daemon" | |
c605ce11 | 279 | %systemd_post sensord.service |
21553339 | 280 | |
28817b89 | 281 | %preun sensord |
21553339 | 282 | if [ "$1" = "0" ]; then |
0183aefa JR |
283 | %service sensord stop |
284 | /sbin/chkconfig --del sensord | |
21553339 | 285 | fi |
c605ce11 JR |
286 | %systemd_preun sensord.service |
287 | ||
288 | %postun sensord | |
289 | %systemd_reload | |
290 | ||
291 | %triggerpostun sensord -- %{name}-sensord < 3.3.2-2 | |
292 | %systemd_trigger sensord.service | |
21553339 | 293 | |
ff90791c JB |
294 | %post fancontrol |
295 | if [ "$1" = 1 ]; then | |
296 | echo "You have to configure fancontrol by running service fancontrol init first." | |
297 | fi | |
298 | /sbin/chkconfig --add fancontrol | |
299 | %service fancontrol restart "fancontrol daemon" | |
300 | ||
97e0f454 | 301 | %preun fancontrol |
302 | if [ "$1" = "0" ]; then | |
ff90791c JB |
303 | %service fancontrol stop |
304 | /sbin/chkconfig --del fancontrol | |
97e0f454 | 305 | fi |
306 | ||
8ab54ac7 | 307 | %files |
e81a4f46 | 308 | %defattr(644,root,root,755) |
d47b13e2 | 309 | %doc CHANGES CONTRIBUTORS README doc/{donations,fan-divisors,progs,temperature-sensors,vid} prog/daemon |
73e058e8 | 310 | %attr(755,root,root) %{_bindir}/sensors-conf-convert |
31e31310 | 311 | %attr(755,root,root) %{_bindir}/sensors |
e3a25e26 | 312 | %attr(755,root,root) %{_bindir}/sensors.sh |
e3a25e26 | 313 | %attr(755,root,root) %{_sbindir}/sensors-detect |
55196153 | 314 | %ifarch %{ix86} %{x8664} x32 |
44af58bf | 315 | %attr(755,root,root) %{_sbindir}/isadump |
904b809c | 316 | %attr(755,root,root) %{_sbindir}/isaset |
902ef4c8 | 317 | %{_mandir}/man8/isadump.8* |
904b809c | 318 | %{_mandir}/man8/isaset.8* |
fe7fef09 | 319 | %endif |
902ef4c8 JB |
320 | %{_mandir}/man1/sensors.1* |
321 | %{_mandir}/man5/sensors.conf.5* | |
d1b5d5f5 | 322 | %{_mandir}/man5/sensors3.conf.5* |
86d02854 | 323 | %{_mandir}/man8/sensors-conf-convert.8* |
d666c5e0 | 324 | %{_mandir}/man8/sensors-detect.8* |
0183aefa | 325 | %attr(754,root,root) /etc/rc.d/init.d/lm_sensors |
73e058e8 | 326 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf |
07943d95 | 327 | %dir %{_sysconfdir}/sensors.d |
0183aefa | 328 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lm_sensors |
c605ce11 | 329 | %{systemdunitdir}/lm_sensors.service |
e3a25e26 | 330 | |
e2443105 ER |
331 | %files libs |
332 | %defattr(644,root,root,755) | |
283f7a60 | 333 | %attr(755,root,root) %{_libdir}/libsensors.so.*.*.* |
1cb1d544 | 334 | %attr(755,root,root) %ghost %{_libdir}/libsensors.so.5 |
e2443105 | 335 | |
e81a4f46 | 336 | %files devel |
f84e5d52 | 337 | %defattr(644,root,root,755) |
c5b58966 | 338 | %doc doc/developers doc/libsensors-API.txt |
283f7a60 | 339 | %attr(755,root,root) %{_libdir}/libsensors.so |
8f139801 | 340 | %{_includedir}/sensors |
283f7a60 | 341 | %{_mandir}/man3/libsensors.3* |
bdcd6c23 | 342 | |
e81a4f46 | 343 | %files static |
344 | %defattr(644,root,root,755) | |
345 | %{_libdir}/libsensors.a | |
054d3984 JB |
346 | |
347 | %files sensord | |
348 | %defattr(644,root,root,755) | |
349 | %attr(754,root,root) %{_sbindir}/sensord | |
0183aefa JR |
350 | %attr(754,root,root) /etc/rc.d/init.d/sensord |
351 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensord | |
054d3984 | 352 | %{_mandir}/man8/sensord.8* |
c605ce11 | 353 | %{systemdunitdir}/sensord.service |
97e0f454 | 354 | |
355 | %files fancontrol | |
356 | %defattr(644,root,root,755) | |
97e0f454 | 357 | %attr(755,root,root) %{_sbindir}/fancontrol |
358 | %attr(755,root,root) %{_sbindir}/pwmconfig | |
f2004a5e JB |
359 | %attr(754,root,root) /etc/rc.d/init.d/fancontrol |
360 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol | |
97e0f454 | 361 | %{_mandir}/man8/fancontrol.8* |
362 | %{_mandir}/man8/pwmconfig.8* |