]>
Commit | Line | Data |
---|---|---|
e2443105 | 1 | # TODO |
af18d423 | 2 | # - a big trigger warning how to use fancontrol and to init it first |
d0e4e449 | 3 | # |
f2004a5e JB |
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 | |
e3a25e26 | 8 | |
34be5856 | 9 | %include /usr/lib/rpm/macros.perl |
f81a7b63 | 10 | Summary: Hardware health monitoring |
eff90cd1 ER |
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): Утиліти для моніторингу апаратури | |
f81a7b63 | 15 | Name: lm_sensors |
7a2e98c7 | 16 | Version: 3.3.2 |
d1b5d5f5 | 17 | Release: 1 |
283f7a60 | 18 | License: GPL v2+ |
f84e5d52 | 19 | Group: Applications/System |
73e058e8 | 20 | Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 |
7a2e98c7 | 21 | # Source0-md5: f357ba00b080ab102a170f7bf8bb2578 |
21553339 | 22 | Source1: sensors.init |
23 | Source2: sensors.sysconfig | |
af18d423 | 24 | Source3: fancontrol.init |
97e0f454 | 25 | Source4: fancontrol.sysconfig |
e3a25e26 | 26 | Source5: sensors.sh |
27 | Source6: sensors_modules.init | |
28 | Source7: sensors_modules.sysconfig | |
73e058e8 MWP |
29 | Patch0: %{name}-ppc.patch |
30 | Patch1: %{name}-iconv-in-libc.patch | |
31 | Patch2: %{name}-sensors-detect-PATH.patch | |
8f786de3 | 32 | Patch3: %{name}-make.patch |
104f07a8 | 33 | URL: http://www.lm-sensors.org/ |
ad983b5b | 34 | BuildRequires: bison |
790b55e5 | 35 | BuildRequires: flex >= 2.5.1 |
3f4f34e5 | 36 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
a64ba14a | 37 | BuildRequires: rpmbuild(macros) >= 1.268 |
4e754930 | 38 | BuildRequires: rrdtool-devel >= 1.2.10 |
d1b5d5f5 | 39 | Requires: %{name}-config >= 3 |
99c4f992 | 40 | Requires: %{name}-libs = %{version}-%{release} |
c1be19b1 | 41 | Requires: dev >= 2.9.0-13 |
205426ad | 42 | Requires: uname(release) >= 2.6.5 |
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 | |
e3a25e26 | 135 | %package config-default |
f2004a5e | 136 | Summary: Default sensors configuration files |
eff90cd1 | 137 | Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors |
e3a25e26 | 138 | Group: Applications/System |
139 | Requires: %{name} = %{version}-%{release} | |
d1b5d5f5 | 140 | Provides: %{name}-config = %{version} |
e3a25e26 | 141 | |
142 | %description config-default | |
143 | Default configuration files for lm_sensors. | |
144 | ||
090657ea JR |
145 | %description config-default -l pl.UTF-8 |
146 | Domyślne pliki konfiguracyjne lm_sensors. | |
f2004a5e | 147 | |
054d3984 JB |
148 | %package sensord |
149 | Summary: Sensord daemon | |
eff90cd1 | 150 | Summary(pl.UTF-8): Demon sensord |
054d3984 | 151 | Group: Daemons |
054d3984 JB |
152 | Requires(post,preun): /sbin/chkconfig |
153 | Requires: %{name} = %{version}-%{release} | |
e3a25e26 | 154 | Requires: %{name}-config |
4428b1ee | 155 | Requires: rc-scripts |
054d3984 JB |
156 | |
157 | %description sensord | |
158 | Sensord daemon. | |
159 | ||
090657ea | 160 | %description sensord -l pl.UTF-8 |
054d3984 JB |
161 | Demon sensord. |
162 | ||
97e0f454 | 163 | %package fancontrol |
164 | Summary: Fancontrol daemon | |
eff90cd1 | 165 | Summary(pl.UTF-8): Demon sterowania wiatraczkami |
97e0f454 | 166 | Group: Daemons |
167 | Requires(post,preun): /sbin/chkconfig | |
168 | Requires: %{name} = %{version}-%{release} | |
169 | Requires: %{name}-sensord = %{version}-%{release} | |
170 | Requires: rc-scripts | |
171 | ||
172 | %description fancontrol | |
173 | Fancontrol daemon monitors current temperature of the computer and | |
174 | adjusts fans speed acordingly. | |
175 | ||
176 | It is crucial to correctly configure this daemon (via running service | |
177 | fancontrol init) and ensuring, that the temperature levels are set not | |
178 | to burn the insides of the computer! | |
179 | ||
090657ea JR |
180 | %description fancontrol -l pl.UTF-8 |
181 | Demon fancontrol monitoruje obecną temperaturę komputera i ustawia | |
182 | odpowiednio prędkość wiatraków. | |
97e0f454 | 183 | |
090657ea JR |
184 | Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez |
185 | uruchomienie service fancontrol init) oraz upewnić się, że progi | |
186 | temperatury są ustawione poprawnie, by nie spalić wnętrza komputera! | |
97e0f454 | 187 | |
bdcd6c23 | 188 | %prep |
f81a7b63 | 189 | %setup -q |
b65b31e0 | 190 | %patch0 -p1 |
02239be8 | 191 | %patch1 -p1 |
5cc4d6dc | 192 | %patch2 -p1 |
8f786de3 | 193 | %patch3 -p1 |
e81a4f46 | 194 | |
bdcd6c23 | 195 | %build |
23e4eeda JB |
196 | %{__make} user \ |
197 | CC="%{__cc}" \ | |
198 | OPTS="%{rpmcflags}" \ | |
73e058e8 | 199 | SYSFS_SUPPORT:=1 \ |
8f786de3 | 200 | PROG_EXTRA:="sensord" |
0227b80e | 201 | |
bdcd6c23 | 202 | %install |
f84e5d52 | 203 | rm -rf $RPM_BUILD_ROOT |
23e4eeda | 204 | |
c75e4a6b | 205 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ |
f2004a5e | 206 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
e81a4f46 | 207 | |
23e4eeda | 208 | %{__make} user_install \ |
215f8be6 | 209 | DESTDIR=$RPM_BUILD_ROOT \ |
210 | PREFIX=%{_prefix} \ | |
211 | ETCDIR=%{_sysconfdir} \ | |
fe7fef09 | 212 | LIBDIR=%{_libdir} \ |
215f8be6 | 213 | MANDIR=%{_mandir} \ |
fe7fef09 | 214 | PROG_EXTRA:="sensord" \ |
73e058e8 | 215 | SYSFS_SUPPORT:=1 |
f17d9868 | 216 | |
f2004a5e JB |
217 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors |
218 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors | |
219 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol | |
220 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol | |
e3a25e26 | 221 | install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir} |
f2004a5e JB |
222 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules |
223 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules | |
07943d95 | 224 | install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d |
125c799a | 225 | |
a70edc8b JB |
226 | %clean |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
e2443105 ER |
229 | %post libs -p /sbin/ldconfig |
230 | %postun libs -p /sbin/ldconfig | |
34be5856 | 231 | |
e3a25e26 | 232 | %post |
233 | if [ -f "%{cmodule}" ]; then | |
234 | /sbin/chkconfig --add sensors_modules | |
235 | %service sensors_modules restart "sensors modules" | |
236 | if [ -f "%{sdaemon}" ]; then | |
237 | /sbin/chkconfig --add sensors | |
238 | %service sensors restart "sensors deamon" | |
239 | fi | |
240 | fi | |
241 | ||
242 | %preun | |
243 | if [ "$1" = "0" ]; then | |
244 | if [ -f "%{sdaemon}" ]; then | |
245 | %service sensors stop | |
246 | /sbin/chkconfig --del sensors | |
247 | fi | |
248 | %service sensors_modules stop | |
249 | /sbin/chkconfig --del sensors_modules | |
250 | fi | |
251 | ||
252 | %post config-default | |
4428b1ee | 253 | if [ "$1" = 1 ]; then |
e3a25e26 | 254 | cat << EOF |
255 | ********************************************************************* | |
256 | * * | |
257 | * NOTE: * | |
258 | * You have to configure sensors to match your motherboard sensors * | |
259 | * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use * | |
260 | * sensors-detect script which can help you find proper modules. * | |
261 | * * | |
262 | ********************************************************************* | |
263 | EOF | |
264 | fi | |
265 | if [ -f "%{smodule}" ]; then | |
266 | /sbin/chkconfig --add sensors_modules | |
267 | %service sensors_modules restart "sensors modules" | |
268 | fi | |
269 | if [ -f "%{sdaemon}" ]; then | |
270 | /sbin/chkconfig --add sensors | |
271 | %service sensors restart "sensors daemon" | |
272 | fi | |
273 | ||
274 | %preun config-default | |
275 | if [ "$1" = "0" ]; then | |
276 | if [ -f "%{sdaemon}" ]; then | |
277 | %service sensors stop | |
278 | /sbin/chkconfig --del sensors | |
279 | fi | |
280 | if [ -f "%{smodule}" ]; then | |
281 | %service sensors_modules stop | |
282 | /sbin/chkconfig --del sensors_modules | |
283 | fi | |
284 | fi | |
285 | ||
286 | %post sensord | |
287 | if [ -f "%{cmodule}" ]; then | |
288 | /sbin/chkconfig --add sensors | |
289 | %service sensors restart "sensors daemon" | |
21553339 | 290 | fi |
291 | ||
28817b89 | 292 | %preun sensord |
21553339 | 293 | if [ "$1" = "0" ]; then |
4428b1ee | 294 | %service sensors stop |
21553339 | 295 | /sbin/chkconfig --del sensors |
296 | fi | |
297 | ||
ff90791c JB |
298 | %post fancontrol |
299 | if [ "$1" = 1 ]; then | |
300 | echo "You have to configure fancontrol by running service fancontrol init first." | |
301 | fi | |
302 | /sbin/chkconfig --add fancontrol | |
303 | %service fancontrol restart "fancontrol daemon" | |
304 | ||
97e0f454 | 305 | %preun fancontrol |
306 | if [ "$1" = "0" ]; then | |
ff90791c JB |
307 | %service fancontrol stop |
308 | /sbin/chkconfig --del fancontrol | |
97e0f454 | 309 | fi |
310 | ||
8ab54ac7 | 311 | %files |
e81a4f46 | 312 | %defattr(644,root,root,755) |
d1b5d5f5 | 313 | %doc CHANGES CONTRIBUTORS README doc/chips |
c5b58966 | 314 | %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid} |
22f1d6df | 315 | %doc prog/daemon |
73e058e8 | 316 | %attr(755,root,root) %{_bindir}/sensors-conf-convert |
31e31310 | 317 | %attr(755,root,root) %{_bindir}/sensors |
e3a25e26 | 318 | %attr(755,root,root) %{_bindir}/sensors.sh |
e3a25e26 | 319 | %attr(755,root,root) %{_sbindir}/sensors-detect |
96187449 | 320 | %ifarch %{ix86} %{x8664} |
44af58bf | 321 | %attr(755,root,root) %{_sbindir}/isadump |
904b809c | 322 | %attr(755,root,root) %{_sbindir}/isaset |
902ef4c8 | 323 | %{_mandir}/man8/isadump.8* |
904b809c | 324 | %{_mandir}/man8/isaset.8* |
fe7fef09 | 325 | %endif |
902ef4c8 JB |
326 | %{_mandir}/man1/sensors.1* |
327 | %{_mandir}/man5/sensors.conf.5* | |
d1b5d5f5 | 328 | %{_mandir}/man5/sensors3.conf.5* |
d666c5e0 | 329 | %{_mandir}/man8/sensors-detect.8* |
f2004a5e | 330 | %attr(754,root,root) /etc/rc.d/init.d/sensors_modules |
075e74d3 | 331 | |
e3a25e26 | 332 | %files config-default |
333 | %defattr(644,root,root,755) | |
73e058e8 | 334 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf |
07943d95 | 335 | %dir %{_sysconfdir}/sensors.d |
f2004a5e | 336 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules |
e3a25e26 | 337 | |
e2443105 ER |
338 | %files libs |
339 | %defattr(644,root,root,755) | |
283f7a60 | 340 | %attr(755,root,root) %{_libdir}/libsensors.so.*.*.* |
c5b58966 | 341 | %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4 |
e2443105 | 342 | |
e81a4f46 | 343 | %files devel |
f84e5d52 | 344 | %defattr(644,root,root,755) |
c5b58966 | 345 | %doc doc/developers doc/libsensors-API.txt |
283f7a60 | 346 | %attr(755,root,root) %{_libdir}/libsensors.so |
8f139801 | 347 | %{_includedir}/sensors |
283f7a60 | 348 | %{_mandir}/man3/libsensors.3* |
bdcd6c23 | 349 | |
e81a4f46 | 350 | %files static |
351 | %defattr(644,root,root,755) | |
352 | %{_libdir}/libsensors.a | |
054d3984 JB |
353 | |
354 | %files sensord | |
355 | %defattr(644,root,root,755) | |
356 | %attr(754,root,root) %{_sbindir}/sensord | |
f2004a5e JB |
357 | %attr(754,root,root) /etc/rc.d/init.d/sensors |
358 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors | |
054d3984 | 359 | %{_mandir}/man8/sensord.8* |
97e0f454 | 360 | |
361 | %files fancontrol | |
362 | %defattr(644,root,root,755) | |
97e0f454 | 363 | %attr(755,root,root) %{_sbindir}/fancontrol |
364 | %attr(755,root,root) %{_sbindir}/pwmconfig | |
f2004a5e JB |
365 | %attr(754,root,root) /etc/rc.d/init.d/fancontrol |
366 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol | |
97e0f454 | 367 | %{_mandir}/man8/fancontrol.8* |
368 | %{_mandir}/man8/pwmconfig.8* |