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