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