]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
- updated to 1.3.2
[packages/lm_sensors.git] / lm_sensors.spec
1 # TODO
2 # - a big trigger warning how to use fancontrol and to init it first
3 #
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
8
9 %include        /usr/lib/rpm/macros.perl
10 Summary:        Hardware health monitoring
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):      Утиліти для моніторингу апаратури
15 Name:           lm_sensors
16 <<<<<<< lm_sensors.spec
17 Version:        2.10.7
18 Release:        %{_rel}
19 License:        GPL
20 =======
21 Version:        3.0.3
22 Release:        2
23 License:        GPL v2+
24 >>>>>>> 1.190
25 Group:          Applications/System
26 <<<<<<< lm_sensors.spec
27 Source0:        http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
28 # Source0-md5:  a7d3c94f1535b060c82a4d52816d4543
29 =======
30 Source0:        http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
31 # Source0-md5:  e88b236228ac2a50821217015b8fd0fa
32 >>>>>>> 1.190
33 Source1:        sensors.init
34 Source2:        sensors.sysconfig
35 Source3:        fancontrol.init
36 Source4:        fancontrol.sysconfig
37 Source5:        sensors.sh
38 Source6:        sensors_modules.init
39 Source7:        sensors_modules.sysconfig
40 Patch0:         %{name}-ppc.patch
41 Patch1:         %{name}-iconv-in-libc.patch
42 Patch2:         %{name}-sensors-detect-PATH.patch
43 Patch3:         %{name}-make.patch
44 URL:            http://www.lm-sensors.org/
45 BuildRequires:  bison
46 BuildRequires:  flex >= 2.5.1
47 BuildRequires:  perl-modules >= 1:5.6
48 BuildRequires:  rpm-perlprov >= 3.0.3-16
49 BuildRequires:  rpmbuild(macros) >= 1.268
50 BuildRequires:  rrdtool-devel >= 1.2.10
51 Requires:       %{name}-config
52 Requires:       %{name}-libs = %{version}-%{release}
53 Requires:       dev >= 2.9.0-13
54 Requires:       uname(release) >= 2.6.5
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %description
58 Tools for monitoring the hardware health of Linux systems containing
59 hardware health monitoring hardware such as the LM78 and LM75.
60
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.
64
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
68 hardware.
69
70 %description -l ru.UTF-8
71 Пакет lm_sensors содержит набор модулей для стандартного доступа к
72 SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
73 поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
74
75 %description -l uk.UTF-8
76 Пакет lm_sensors містить набір модулів для стандартного доступу до
77 SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
78 яка відсутня у стандартних старих ядрах 2.2.XX!
79
80 %package libs
81 Summary:        lm_sensors library
82 Summary(pl.UTF-8):      Biblioteka lm_sensors
83 Group:          Libraries
84 Obsoletes:      liblm_sensors1
85 Conflicts:      lm_sensors <= 2.9.2-2
86
87 %description libs
88 lm_sensors library.
89
90 %description libs -l pl.UTF-8
91 Biblioteka lm_sensors.
92
93 %package devel
94 Summary:        Header files for lm_sensors
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
99 Group:          Development/Libraries
100 Requires:       %{name}-libs = %{version}-%{release}
101 Obsoletes:      liblm_sensors1-devel
102
103 %description devel
104 Header files for lm_sensors.
105
106 %description devel -l pl.UTF-8
107 Pliki nagłówkowe dla lm_sensors.
108
109 %description devel -l pt_BR.UTF-8
110 Arquivos necessários ao desenvolvimento de programas que usem o
111 lm_sensors.
112
113 %description devel -l ru.UTF-8
114 Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
115 построения программ, использующих данные сенсоров.
116
117 %description devel -l uk.UTF-8
118 Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
119 побудови програм, які використовують дані сенсорів.
120
121 %package static
122 Summary:        Static libraries for lm_sensors
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
127 Group:          Development/Libraries
128 Requires:       %{name}-devel = %{version}-%{release}
129
130 %description static
131 Static libraries for lm_sensors.
132
133 %description static -l pl.UTF-8
134 Biblioteki statyczne dla lm_sensors.
135
136 %description static -l pt_BR.UTF-8
137 Bibliotecas estáticas para desenvolvimento com lm_sensors
138
139 %description static -l ru.UTF-8
140 Пакет lm_sensors-static включает статические библиотеки, необходимые
141 для построения программ, использующих данные сенсоров.
142
143 %description static -l uk.UTF-8
144 Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
145 побудови програм, які використовують дані сенсорів.
146
147 %package config-default
148 Summary:        Default sensors configuration files
149 Summary(pl.UTF-8):      Domyślne pliki konfiguracyjne lm_sensors
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
157 %description config-default -l pl.UTF-8
158 Domyślne pliki konfiguracyjne lm_sensors.
159
160 %package sensord
161 Summary:        Sensord daemon
162 Summary(pl.UTF-8):      Demon sensord
163 Group:          Daemons
164 Requires(post,preun):   /sbin/chkconfig
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       %{name}-config
167 Requires:       rc-scripts
168
169 %description sensord
170 Sensord daemon.
171
172 %description sensord -l pl.UTF-8
173 Demon sensord.
174
175 %package fancontrol
176 Summary:        Fancontrol daemon
177 Summary(pl.UTF-8):      Demon sterowania wiatraczkami
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
192 %description fancontrol -l pl.UTF-8
193 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
194 odpowiednio prędkość wiatraków.
195
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!
199
200 %prep
201 %setup -q
202 %patch0 -p1
203 %patch1 -p1
204 %patch2 -p1
205 %patch3 -p1
206
207 %build
208 %{__make} user \
209         CC="%{__cc}" \
210         OPTS="%{rpmcflags}" \
211         SYSFS_SUPPORT:=1 \
212         PROG_EXTRA:="sensord"
213
214 %install
215 rm -rf $RPM_BUILD_ROOT
216
217 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
218         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
219
220 %{__make} user_install \
221         DESTDIR=$RPM_BUILD_ROOT \
222         PREFIX=%{_prefix} \
223         ETCDIR=%{_sysconfdir} \
224         LIBDIR=%{_libdir} \
225         MANDIR=%{_mandir} \
226         PROG_EXTRA:="sensord" \
227         SYSFS_SUPPORT:=1
228
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
233 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
234 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
235 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
236
237 %clean
238 rm -rf $RPM_BUILD_ROOT
239
240 %post   libs -p /sbin/ldconfig
241 %postun libs -p /sbin/ldconfig
242
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
264 if [ "$1" = 1 ]; then
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"
301 fi
302
303 %preun sensord
304 if [ "$1" = "0" ]; then
305         %service sensors stop
306         /sbin/chkconfig --del sensors
307 fi
308
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
316 %preun fancontrol
317 if [ "$1" = "0" ]; then
318         %service fancontrol stop
319         /sbin/chkconfig --del fancontrol
320 fi
321
322 %files
323 %defattr(644,root,root,755)
324 %doc CHANGES README doc/chips
325 %doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
326 %doc prog/{daemon,maxilife}
327 %attr(755,root,root) %{_bindir}/sensors-conf-convert
328 %attr(755,root,root) %{_bindir}/sensors
329 %attr(755,root,root) %{_bindir}/sensors.sh
330 %attr(755,root,root) %{_sbindir}/sensors-detect
331 %ifarch %{ix86} %{x8664}
332 %attr(755,root,root) %{_sbindir}/isadump
333 %attr(755,root,root) %{_sbindir}/isaset
334 %{_mandir}/man8/isadump.8*
335 %{_mandir}/man8/isaset.8*
336 %endif
337 %{_mandir}/man1/sensors.1*
338 %{_mandir}/man5/sensors.conf.5*
339 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
340
341 %files config-default
342 %defattr(644,root,root,755)
343 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
344 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
345
346 %files libs
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
350
351 %files devel
352 %defattr(644,root,root,755)
353 %doc doc/developers doc/libsensors-API.txt
354 %attr(755,root,root) %{_libdir}/libsensors.so
355 %{_includedir}/sensors
356 %{_mandir}/man3/libsensors.3*
357
358 %files static
359 %defattr(644,root,root,755)
360 %{_libdir}/libsensors.a
361
362 %files sensord
363 %defattr(644,root,root,755)
364 %attr(754,root,root) %{_sbindir}/sensord
365 %attr(754,root,root) /etc/rc.d/init.d/sensors
366 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
367 %{_mandir}/man8/sensors-detect.8*
368 %{_mandir}/man8/sensord.8*
369
370 %files fancontrol
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_sbindir}/fancontrol
373 %attr(755,root,root) %{_sbindir}/pwmconfig
374 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
375 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
376 %{_mandir}/man8/fancontrol.8*
377 %{_mandir}/man8/pwmconfig.8*
This page took 0.090142 seconds and 4 git commands to generate.