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