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