]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - package i2c-tools (eeprom*, i2c* etc.) | |
3 | # - a big trigger warning how to use fancontrol and to init it first | |
4 | # | |
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 | |
9 | ||
10 | %include /usr/lib/rpm/macros.perl | |
11 | Summary: Hardware health monitoring | |
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): Утиліти для моніторингу апаратури | |
16 | Name: lm_sensors | |
17 | Version: 3.0.2 | |
18 | Release: 1 | |
19 | License: GPL v2+ | |
20 | Group: Applications/System | |
21 | Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 | |
22 | # Source0-md5: 5b210ba9cc01f00161c438fd618484e5 | |
23 | Source1: sensors.init | |
24 | Source2: sensors.sysconfig | |
25 | Source3: fancontrol.init | |
26 | Source4: fancontrol.sysconfig | |
27 | Source5: sensors.sh | |
28 | Source6: sensors_modules.init | |
29 | Source7: sensors_modules.sysconfig | |
30 | Patch0: %{name}-ppc.patch | |
31 | Patch1: %{name}-iconv-in-libc.patch | |
32 | Patch2: %{name}-sensors-detect-PATH.patch | |
33 | Patch3: %{name}-make.patch | |
34 | URL: http://www.lm-sensors.org/ | |
35 | BuildRequires: bison | |
36 | BuildRequires: flex >= 2.5.1 | |
37 | BuildRequires: perl-modules >= 1:5.6 | |
38 | BuildRequires: rpm-perlprov >= 3.0.3-16 | |
39 | BuildRequires: rpmbuild(macros) >= 1.268 | |
40 | BuildRequires: rrdtool-devel >= 1.2.10 | |
41 | Requires: %{name}-config | |
42 | Requires: %{name}-libs = %{version}-%{release} | |
43 | Requires: dev >= 2.9.0-13 | |
44 | Requires: dmidecode | |
45 | Requires: uname(release) >= 2.6.5 | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | Tools for monitoring the hardware health of Linux systems containing | |
50 | hardware health monitoring hardware such as the LM78 and LM75. | |
51 | ||
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. | |
55 | ||
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 | |
59 | hardware. | |
60 | ||
61 | %description -l ru.UTF-8 | |
62 | Пакет lm_sensors содержит набор модулей для стандартного доступа к | |
63 | SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная | |
64 | поддержка, отсутствующая в стандартных старых ядрах 2.2.XX! | |
65 | ||
66 | %description -l uk.UTF-8 | |
67 | Пакет lm_sensors містить набір модулів для стандартного доступу до | |
68 | SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка, | |
69 | яка відсутня у стандартних старих ядрах 2.2.XX! | |
70 | ||
71 | %package libs | |
72 | Summary: lm_sensors library | |
73 | Summary(pl.UTF-8): Biblioteka lm_sensors | |
74 | Group: Libraries | |
75 | Obsoletes: liblm_sensors1 | |
76 | Conflicts: lm_sensors <= 2.9.2-2 | |
77 | ||
78 | %description libs | |
79 | lm_sensors library. | |
80 | ||
81 | %description libs -l pl.UTF-8 | |
82 | Biblioteka lm_sensors. | |
83 | ||
84 | %package devel | |
85 | Summary: Header files for lm_sensors | |
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 | |
90 | Group: Development/Libraries | |
91 | Requires: %{name}-libs = %{version}-%{release} | |
92 | Obsoletes: liblm_sensors1-devel | |
93 | ||
94 | %description devel | |
95 | Header files for lm_sensors. | |
96 | ||
97 | %description devel -l pl.UTF-8 | |
98 | Pliki nagłówkowe dla lm_sensors. | |
99 | ||
100 | %description devel -l pt_BR.UTF-8 | |
101 | Arquivos necessários ao desenvolvimento de programas que usem o | |
102 | lm_sensors. | |
103 | ||
104 | %description devel -l ru.UTF-8 | |
105 | Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для | |
106 | построения программ, использующих данные сенсоров. | |
107 | ||
108 | %description devel -l uk.UTF-8 | |
109 | Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для | |
110 | побудови програм, які використовують дані сенсорів. | |
111 | ||
112 | %package static | |
113 | Summary: Static libraries for lm_sensors | |
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 | |
118 | Group: Development/Libraries | |
119 | Requires: %{name}-devel = %{version}-%{release} | |
120 | ||
121 | %description static | |
122 | Static libraries for lm_sensors. | |
123 | ||
124 | %description static -l pl.UTF-8 | |
125 | Biblioteki statyczne dla lm_sensors. | |
126 | ||
127 | %description static -l pt_BR.UTF-8 | |
128 | Bibliotecas estáticas para desenvolvimento com lm_sensors | |
129 | ||
130 | %description static -l ru.UTF-8 | |
131 | Пакет lm_sensors-static включает статические библиотеки, необходимые | |
132 | для построения программ, использующих данные сенсоров. | |
133 | ||
134 | %description static -l uk.UTF-8 | |
135 | Пакет lm_sensors-static містить статичні бібліотеки, необхідні для | |
136 | побудови програм, які використовують дані сенсорів. | |
137 | ||
138 | %package config-default | |
139 | Summary: Default sensors configuration files | |
140 | Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors | |
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 | ||
148 | %description config-default -l pl.UTF-8 | |
149 | Domyślne pliki konfiguracyjne lm_sensors. | |
150 | ||
151 | %package sensord | |
152 | Summary: Sensord daemon | |
153 | Summary(pl.UTF-8): Demon sensord | |
154 | Group: Daemons | |
155 | Requires(post,preun): /sbin/chkconfig | |
156 | Requires: %{name} = %{version}-%{release} | |
157 | Requires: %{name}-config | |
158 | Requires: rc-scripts | |
159 | ||
160 | %description sensord | |
161 | Sensord daemon. | |
162 | ||
163 | %description sensord -l pl.UTF-8 | |
164 | Demon sensord. | |
165 | ||
166 | %package fancontrol | |
167 | Summary: Fancontrol daemon | |
168 | Summary(pl.UTF-8): Demon sterowania wiatraczkami | |
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 | ||
183 | %description fancontrol -l pl.UTF-8 | |
184 | Demon fancontrol monitoruje obecną temperaturę komputera i ustawia | |
185 | odpowiednio prędkość wiatraków. | |
186 | ||
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! | |
190 | ||
191 | %prep | |
192 | %setup -q | |
193 | %patch0 -p1 | |
194 | %patch1 -p1 | |
195 | %patch2 -p1 | |
196 | %patch3 -p1 | |
197 | ||
198 | %build | |
199 | %{__make} user \ | |
200 | CC="%{__cc}" \ | |
201 | OPTS="%{rpmcflags}" \ | |
202 | SYSFS_SUPPORT:=1 \ | |
203 | PROG_EXTRA:="sensord" | |
204 | ||
205 | %install | |
206 | rm -rf $RPM_BUILD_ROOT | |
207 | ||
208 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ | |
209 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
210 | ||
211 | %{__make} user_install \ | |
212 | DESTDIR=$RPM_BUILD_ROOT \ | |
213 | PREFIX=%{_prefix} \ | |
214 | ETCDIR=%{_sysconfdir} \ | |
215 | LIBDIR=%{_libdir} \ | |
216 | MANDIR=%{_mandir} \ | |
217 | PROG_EXTRA:="sensord" \ | |
218 | SYSFS_SUPPORT:=1 | |
219 | ||
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 | |
224 | install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir} | |
225 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules | |
226 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules | |
227 | ||
228 | %clean | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %post libs -p /sbin/ldconfig | |
232 | %postun libs -p /sbin/ldconfig | |
233 | ||
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 | |
255 | if [ "$1" = 1 ]; then | |
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" | |
292 | fi | |
293 | ||
294 | %preun sensord | |
295 | if [ "$1" = "0" ]; then | |
296 | %service sensors stop | |
297 | /sbin/chkconfig --del sensors | |
298 | fi | |
299 | ||
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 | ||
307 | %preun fancontrol | |
308 | if [ "$1" = "0" ]; then | |
309 | %service fancontrol stop | |
310 | /sbin/chkconfig --del fancontrol | |
311 | fi | |
312 | ||
313 | %files | |
314 | %defattr(644,root,root,755) | |
315 | %doc CHANGES README doc/chips | |
316 | %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid} | |
317 | %doc prog/{daemon,maxilife} | |
318 | %attr(755,root,root) %{_bindir}/sensors-conf-convert | |
319 | %attr(755,root,root) %{_bindir}/sensors | |
320 | %attr(755,root,root) %{_bindir}/sensors.sh | |
321 | %attr(755,root,root) %{_sbindir}/sensors-detect | |
322 | %ifarch %{ix86} %{x8664} | |
323 | %attr(755,root,root) %{_sbindir}/isadump | |
324 | %attr(755,root,root) %{_sbindir}/isaset | |
325 | %{_mandir}/man8/isadump.8* | |
326 | %{_mandir}/man8/isaset.8* | |
327 | %endif | |
328 | %{_mandir}/man1/sensors.1* | |
329 | %{_mandir}/man5/sensors.conf.5* | |
330 | %attr(754,root,root) /etc/rc.d/init.d/sensors_modules | |
331 | ||
332 | %files config-default | |
333 | %defattr(644,root,root,755) | |
334 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf | |
335 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules | |
336 | ||
337 | %files libs | |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_libdir}/libsensors.so.*.*.* | |
340 | %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4 | |
341 | ||
342 | %files devel | |
343 | %defattr(644,root,root,755) | |
344 | %doc doc/developers doc/libsensors-API.txt | |
345 | %attr(755,root,root) %{_libdir}/libsensors.so | |
346 | %{_includedir}/sensors | |
347 | %{_mandir}/man3/libsensors.3* | |
348 | ||
349 | %files static | |
350 | %defattr(644,root,root,755) | |
351 | %{_libdir}/libsensors.a | |
352 | ||
353 | %files sensord | |
354 | %defattr(644,root,root,755) | |
355 | %attr(754,root,root) %{_sbindir}/sensord | |
356 | %attr(754,root,root) /etc/rc.d/init.d/sensors | |
357 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors | |
358 | %{_mandir}/man8/sensors-detect.8* | |
359 | %{_mandir}/man8/sensord.8* | |
360 | ||
361 | %files fancontrol | |
362 | %defattr(644,root,root,755) | |
363 | %attr(755,root,root) %{_sbindir}/fancontrol | |
364 | %attr(755,root,root) %{_sbindir}/pwmconfig | |
365 | %attr(754,root,root) /etc/rc.d/init.d/fancontrol | |
366 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol | |
367 | %{_mandir}/man8/fancontrol.8* | |
368 | %{_mandir}/man8/pwmconfig.8* |