]>
Commit | Line | Data |
---|---|---|
e2443105 | 1 | # TODO |
205426ad | 2 | # - package i2c-tools (eeprom*, i2c* etc.) |
af18d423 | 3 | # - a big trigger warning how to use fancontrol and to init it first |
d0e4e449 | 4 | # |
f2004a5e JB |
5 | %define cmodule /etc/sysconfig/sensors_modules |
6 | %define cdaemon /etc/sysconfig/sensors | |
7 | %define smodule /etc/rc.d/init.d/sensors_modules | |
8 | %define sdaemon /etc/rc.d/init.d/sensors | |
e3a25e26 | 9 | |
34be5856 | 10 | %include /usr/lib/rpm/macros.perl |
f81a7b63 | 11 | Summary: Hardware health monitoring |
eff90cd1 ER |
12 | Summary(pl.UTF-8): Monitor stanu sprzętu |
13 | Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware | |
14 | Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры | |
15 | Summary(uk.UTF-8): Утиліти для моніторингу апаратури | |
f81a7b63 | 16 | Name: lm_sensors |
c5b58966 | 17 | Version: 3.0.2 |
73e058e8 | 18 | Release: 1 |
283f7a60 | 19 | License: GPL v2+ |
f84e5d52 | 20 | Group: Applications/System |
73e058e8 | 21 | Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 |
c5b58966 | 22 | # Source0-md5: 5b210ba9cc01f00161c438fd618484e5 |
21553339 | 23 | Source1: sensors.init |
24 | Source2: sensors.sysconfig | |
af18d423 | 25 | Source3: fancontrol.init |
97e0f454 | 26 | Source4: fancontrol.sysconfig |
e3a25e26 | 27 | Source5: sensors.sh |
28 | Source6: sensors_modules.init | |
29 | Source7: sensors_modules.sysconfig | |
73e058e8 MWP |
30 | Patch0: %{name}-ppc.patch |
31 | Patch1: %{name}-iconv-in-libc.patch | |
32 | Patch2: %{name}-sensors-detect-PATH.patch | |
8f786de3 | 33 | Patch3: %{name}-make.patch |
104f07a8 | 34 | URL: http://www.lm-sensors.org/ |
ad983b5b | 35 | BuildRequires: bison |
790b55e5 | 36 | BuildRequires: flex >= 2.5.1 |
23900c6a | 37 | BuildRequires: perl-modules >= 1:5.6 |
3f4f34e5 | 38 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
a64ba14a | 39 | BuildRequires: rpmbuild(macros) >= 1.268 |
4e754930 | 40 | BuildRequires: rrdtool-devel >= 1.2.10 |
205426ad | 41 | Requires: %{name}-config |
99c4f992 | 42 | Requires: %{name}-libs = %{version}-%{release} |
c1be19b1 | 43 | Requires: dev >= 2.9.0-13 |
c14db412 | 44 | Requires: dmidecode |
205426ad | 45 | Requires: uname(release) >= 2.6.5 |
c1be19b1 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
bdcd6c23 | 47 | |
bdcd6c23 | 48 | %description |
f81a7b63 | 49 | Tools for monitoring the hardware health of Linux systems containing |
50 | hardware health monitoring hardware such as the LM78 and LM75. | |
bdcd6c23 | 51 | |
090657ea JR |
52 | %description -l pl.UTF-8 |
53 | Narzędzie do monitorowania sprzętu w systemach linuksowych | |
54 | wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75. | |
e81a4f46 | 55 | |
090657ea JR |
56 | %description -l pt_BR.UTF-8 |
57 | Ferramentas para monitoração do hardware. Contém uma coleção de | |
58 | módulos para acesso genérico ao barramento SMBus e monitoração de | |
c75e4a6b | 59 | hardware. |
60 | ||
090657ea JR |
61 | %description -l ru.UTF-8 |
62 | Пакет lm_sensors содержит набор модулей для стандартного доступа к | |
63 | SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная | |
64 | поддержка, отсутствующая в стандартных старых ядрах 2.2.XX! | |
ff19563a | 65 | |
090657ea JR |
66 | %description -l uk.UTF-8 |
67 | Пакет lm_sensors містить набір модулів для стандартного доступу до | |
68 | SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка, | |
69 | яка відсутня у стандартних старих ядрах 2.2.XX! | |
ff19563a | 70 | |
e2443105 ER |
71 | %package libs |
72 | Summary: lm_sensors library | |
eff90cd1 | 73 | Summary(pl.UTF-8): Biblioteka lm_sensors |
e2443105 | 74 | Group: Libraries |
99c4f992 | 75 | Obsoletes: liblm_sensors1 |
c7a3989d | 76 | Conflicts: lm_sensors <= 2.9.2-2 |
e2443105 ER |
77 | |
78 | %description libs | |
79 | lm_sensors library. | |
80 | ||
090657ea | 81 | %description libs -l pl.UTF-8 |
b6d585f3 JB |
82 | Biblioteka lm_sensors. |
83 | ||
e81a4f46 | 84 | %package devel |
f84e5d52 | 85 | Summary: Header files for lm_sensors |
eff90cd1 ER |
86 | Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors |
87 | Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors | |
88 | Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors | |
89 | Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors | |
f84e5d52 | 90 | Group: Development/Libraries |
e2443105 | 91 | Requires: %{name}-libs = %{version}-%{release} |
c75e4a6b | 92 | Obsoletes: liblm_sensors1-devel |
e81a4f46 | 93 | |
94 | %description devel | |
95 | Header files for lm_sensors. | |
96 | ||
090657ea JR |
97 | %description devel -l pl.UTF-8 |
98 | Pliki nagłówkowe dla lm_sensors. | |
e81a4f46 | 99 | |
090657ea JR |
100 | %description devel -l pt_BR.UTF-8 |
101 | Arquivos necessários ao desenvolvimento de programas que usem o | |
c75e4a6b | 102 | lm_sensors. |
103 | ||
090657ea JR |
104 | %description devel -l ru.UTF-8 |
105 | Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для | |
106 | построения программ, использующих данные сенсоров. | |
ff19563a | 107 | |
090657ea JR |
108 | %description devel -l uk.UTF-8 |
109 | Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для | |
110 | побудови програм, які використовують дані сенсорів. | |
ff19563a | 111 | |
e81a4f46 | 112 | %package static |
113 | Summary: Static libraries for lm_sensors | |
eff90cd1 ER |
114 | Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors |
115 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors | |
116 | Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors | |
117 | Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors | |
f84e5d52 | 118 | Group: Development/Libraries |
7b7664e5 | 119 | Requires: %{name}-devel = %{version}-%{release} |
e81a4f46 | 120 | |
121 | %description static | |
033e04f4 | 122 | Static libraries for lm_sensors. |
e81a4f46 | 123 | |
090657ea | 124 | %description static -l pl.UTF-8 |
e81a4f46 | 125 | Biblioteki statyczne dla lm_sensors. |
126 | ||
090657ea JR |
127 | %description static -l pt_BR.UTF-8 |
128 | Bibliotecas estáticas para desenvolvimento com lm_sensors | |
c75e4a6b | 129 | |
090657ea JR |
130 | %description static -l ru.UTF-8 |
131 | Пакет lm_sensors-static включает статические библиотеки, необходимые | |
132 | для построения программ, использующих данные сенсоров. | |
ff19563a | 133 | |
090657ea JR |
134 | %description static -l uk.UTF-8 |
135 | Пакет lm_sensors-static містить статичні бібліотеки, необхідні для | |
136 | побудови програм, які використовують дані сенсорів. | |
ff19563a | 137 | |
e3a25e26 | 138 | %package config-default |
f2004a5e | 139 | Summary: Default sensors configuration files |
eff90cd1 | 140 | Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors |
e3a25e26 | 141 | Group: Applications/System |
142 | Requires: %{name} = %{version}-%{release} | |
143 | Provides: %{name}-config | |
144 | ||
145 | %description config-default | |
146 | Default configuration files for lm_sensors. | |
147 | ||
090657ea JR |
148 | %description config-default -l pl.UTF-8 |
149 | Domyślne pliki konfiguracyjne lm_sensors. | |
f2004a5e | 150 | |
054d3984 JB |
151 | %package sensord |
152 | Summary: Sensord daemon | |
eff90cd1 | 153 | Summary(pl.UTF-8): Demon sensord |
054d3984 | 154 | Group: Daemons |
054d3984 JB |
155 | Requires(post,preun): /sbin/chkconfig |
156 | Requires: %{name} = %{version}-%{release} | |
e3a25e26 | 157 | Requires: %{name}-config |
4428b1ee | 158 | Requires: rc-scripts |
054d3984 JB |
159 | |
160 | %description sensord | |
161 | Sensord daemon. | |
162 | ||
090657ea | 163 | %description sensord -l pl.UTF-8 |
054d3984 JB |
164 | Demon sensord. |
165 | ||
97e0f454 | 166 | %package fancontrol |
167 | Summary: Fancontrol daemon | |
eff90cd1 | 168 | Summary(pl.UTF-8): Demon sterowania wiatraczkami |
97e0f454 | 169 | Group: Daemons |
170 | Requires(post,preun): /sbin/chkconfig | |
171 | Requires: %{name} = %{version}-%{release} | |
172 | Requires: %{name}-sensord = %{version}-%{release} | |
173 | Requires: rc-scripts | |
174 | ||
175 | %description fancontrol | |
176 | Fancontrol daemon monitors current temperature of the computer and | |
177 | adjusts fans speed acordingly. | |
178 | ||
179 | It is crucial to correctly configure this daemon (via running service | |
180 | fancontrol init) and ensuring, that the temperature levels are set not | |
181 | to burn the insides of the computer! | |
182 | ||
090657ea JR |
183 | %description fancontrol -l pl.UTF-8 |
184 | Demon fancontrol monitoruje obecną temperaturę komputera i ustawia | |
185 | odpowiednio prędkość wiatraków. | |
97e0f454 | 186 | |
090657ea JR |
187 | Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez |
188 | uruchomienie service fancontrol init) oraz upewnić się, że progi | |
189 | temperatury są ustawione poprawnie, by nie spalić wnętrza komputera! | |
97e0f454 | 190 | |
bdcd6c23 | 191 | %prep |
f81a7b63 | 192 | %setup -q |
b65b31e0 | 193 | %patch0 -p1 |
02239be8 | 194 | %patch1 -p1 |
5cc4d6dc | 195 | %patch2 -p1 |
8f786de3 | 196 | %patch3 -p1 |
e81a4f46 | 197 | |
bdcd6c23 | 198 | %build |
23e4eeda JB |
199 | %{__make} user \ |
200 | CC="%{__cc}" \ | |
201 | OPTS="%{rpmcflags}" \ | |
73e058e8 | 202 | SYSFS_SUPPORT:=1 \ |
8f786de3 | 203 | PROG_EXTRA:="sensord" |
0227b80e | 204 | |
bdcd6c23 | 205 | %install |
f84e5d52 | 206 | rm -rf $RPM_BUILD_ROOT |
23e4eeda | 207 | |
c75e4a6b | 208 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ |
f2004a5e | 209 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
e81a4f46 | 210 | |
23e4eeda | 211 | %{__make} user_install \ |
215f8be6 | 212 | DESTDIR=$RPM_BUILD_ROOT \ |
213 | PREFIX=%{_prefix} \ | |
214 | ETCDIR=%{_sysconfdir} \ | |
fe7fef09 | 215 | LIBDIR=%{_libdir} \ |
215f8be6 | 216 | MANDIR=%{_mandir} \ |
fe7fef09 | 217 | PROG_EXTRA:="sensord" \ |
73e058e8 | 218 | SYSFS_SUPPORT:=1 |
f17d9868 | 219 | |
f2004a5e JB |
220 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors |
221 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors | |
222 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol | |
223 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol | |
e3a25e26 | 224 | install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir} |
f2004a5e JB |
225 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules |
226 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules | |
125c799a | 227 | |
a70edc8b JB |
228 | %clean |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
e2443105 ER |
231 | %post libs -p /sbin/ldconfig |
232 | %postun libs -p /sbin/ldconfig | |
34be5856 | 233 | |
e3a25e26 | 234 | %post |
235 | if [ -f "%{cmodule}" ]; then | |
236 | /sbin/chkconfig --add sensors_modules | |
237 | %service sensors_modules restart "sensors modules" | |
238 | if [ -f "%{sdaemon}" ]; then | |
239 | /sbin/chkconfig --add sensors | |
240 | %service sensors restart "sensors deamon" | |
241 | fi | |
242 | fi | |
243 | ||
244 | %preun | |
245 | if [ "$1" = "0" ]; then | |
246 | if [ -f "%{sdaemon}" ]; then | |
247 | %service sensors stop | |
248 | /sbin/chkconfig --del sensors | |
249 | fi | |
250 | %service sensors_modules stop | |
251 | /sbin/chkconfig --del sensors_modules | |
252 | fi | |
253 | ||
254 | %post config-default | |
4428b1ee | 255 | if [ "$1" = 1 ]; then |
e3a25e26 | 256 | cat << EOF |
257 | ********************************************************************* | |
258 | * * | |
259 | * NOTE: * | |
260 | * You have to configure sensors to match your motherboard sensors * | |
261 | * in /etc/sensors.conf and /etc/sysconfig/sensors_modules. Use * | |
262 | * sensors-detect script which can help you find proper modules. * | |
263 | * * | |
264 | ********************************************************************* | |
265 | EOF | |
266 | fi | |
267 | if [ -f "%{smodule}" ]; then | |
268 | /sbin/chkconfig --add sensors_modules | |
269 | %service sensors_modules restart "sensors modules" | |
270 | fi | |
271 | if [ -f "%{sdaemon}" ]; then | |
272 | /sbin/chkconfig --add sensors | |
273 | %service sensors restart "sensors daemon" | |
274 | fi | |
275 | ||
276 | %preun config-default | |
277 | if [ "$1" = "0" ]; then | |
278 | if [ -f "%{sdaemon}" ]; then | |
279 | %service sensors stop | |
280 | /sbin/chkconfig --del sensors | |
281 | fi | |
282 | if [ -f "%{smodule}" ]; then | |
283 | %service sensors_modules stop | |
284 | /sbin/chkconfig --del sensors_modules | |
285 | fi | |
286 | fi | |
287 | ||
288 | %post sensord | |
289 | if [ -f "%{cmodule}" ]; then | |
290 | /sbin/chkconfig --add sensors | |
291 | %service sensors restart "sensors daemon" | |
21553339 | 292 | fi |
293 | ||
28817b89 | 294 | %preun sensord |
21553339 | 295 | if [ "$1" = "0" ]; then |
4428b1ee | 296 | %service sensors stop |
21553339 | 297 | /sbin/chkconfig --del sensors |
298 | fi | |
299 | ||
ff90791c JB |
300 | %post fancontrol |
301 | if [ "$1" = 1 ]; then | |
302 | echo "You have to configure fancontrol by running service fancontrol init first." | |
303 | fi | |
304 | /sbin/chkconfig --add fancontrol | |
305 | %service fancontrol restart "fancontrol daemon" | |
306 | ||
97e0f454 | 307 | %preun fancontrol |
308 | if [ "$1" = "0" ]; then | |
ff90791c JB |
309 | %service fancontrol stop |
310 | /sbin/chkconfig --del fancontrol | |
97e0f454 | 311 | fi |
312 | ||
8ab54ac7 | 313 | %files |
e81a4f46 | 314 | %defattr(644,root,root,755) |
73e058e8 | 315 | %doc CHANGES README doc/chips |
c5b58966 | 316 | %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid} |
73e058e8 MWP |
317 | %doc prog/{daemon,maxilife} |
318 | %attr(755,root,root) %{_bindir}/sensors-conf-convert | |
31e31310 | 319 | %attr(755,root,root) %{_bindir}/sensors |
e3a25e26 | 320 | %attr(755,root,root) %{_bindir}/sensors.sh |
e3a25e26 | 321 | %attr(755,root,root) %{_sbindir}/sensors-detect |
96187449 | 322 | %ifarch %{ix86} %{x8664} |
44af58bf | 323 | %attr(755,root,root) %{_sbindir}/isadump |
904b809c | 324 | %attr(755,root,root) %{_sbindir}/isaset |
902ef4c8 | 325 | %{_mandir}/man8/isadump.8* |
904b809c | 326 | %{_mandir}/man8/isaset.8* |
fe7fef09 | 327 | %endif |
902ef4c8 JB |
328 | %{_mandir}/man1/sensors.1* |
329 | %{_mandir}/man5/sensors.conf.5* | |
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 |
f2004a5e | 335 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules |
e3a25e26 | 336 | |
e2443105 ER |
337 | %files libs |
338 | %defattr(644,root,root,755) | |
283f7a60 | 339 | %attr(755,root,root) %{_libdir}/libsensors.so.*.*.* |
c5b58966 | 340 | %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4 |
e2443105 | 341 | |
e81a4f46 | 342 | %files devel |
f84e5d52 | 343 | %defattr(644,root,root,755) |
c5b58966 | 344 | %doc doc/developers doc/libsensors-API.txt |
283f7a60 | 345 | %attr(755,root,root) %{_libdir}/libsensors.so |
8f139801 | 346 | %{_includedir}/sensors |
283f7a60 | 347 | %{_mandir}/man3/libsensors.3* |
bdcd6c23 | 348 | |
e81a4f46 | 349 | %files static |
350 | %defattr(644,root,root,755) | |
351 | %{_libdir}/libsensors.a | |
054d3984 JB |
352 | |
353 | %files sensord | |
354 | %defattr(644,root,root,755) | |
355 | %attr(754,root,root) %{_sbindir}/sensord | |
f2004a5e JB |
356 | %attr(754,root,root) /etc/rc.d/init.d/sensors |
357 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors | |
b6db2e89 | 358 | %{_mandir}/man8/sensors-detect.8* |
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* |