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