]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
- dropped BR: perl-modules
[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.1.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:  58a9a225808ac4587c4c8cbd12b40b5c
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:  rpm-perlprov >= 3.0.3-16
37 BuildRequires:  rpmbuild(macros) >= 1.268
38 BuildRequires:  rrdtool-devel >= 1.2.10
39 Requires:       %{name}-config
40 Requires:       %{name}-libs = %{version}-%{release}
41 Requires:       dev >= 2.9.0-13
42 Requires:       uname(release) >= 2.6.5
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 config-default
136 Summary:        Default sensors configuration files
137 Summary(pl.UTF-8):      Domyślne pliki konfiguracyjne lm_sensors
138 Group:          Applications/System
139 Requires:       %{name} = %{version}-%{release}
140 Provides:       %{name}-config
141
142 %description config-default
143 Default configuration files for lm_sensors.
144
145 %description config-default -l pl.UTF-8
146 Domyślne pliki konfiguracyjne lm_sensors.
147
148 %package sensord
149 Summary:        Sensord daemon
150 Summary(pl.UTF-8):      Demon sensord
151 Group:          Daemons
152 Requires(post,preun):   /sbin/chkconfig
153 Requires:       %{name} = %{version}-%{release}
154 Requires:       %{name}-config
155 Requires:       rc-scripts
156
157 %description sensord
158 Sensord daemon.
159
160 %description sensord -l pl.UTF-8
161 Demon sensord.
162
163 %package fancontrol
164 Summary:        Fancontrol daemon
165 Summary(pl.UTF-8):      Demon sterowania wiatraczkami
166 Group:          Daemons
167 Requires(post,preun):   /sbin/chkconfig
168 Requires:       %{name} = %{version}-%{release}
169 Requires:       %{name}-sensord = %{version}-%{release}
170 Requires:       rc-scripts
171
172 %description fancontrol
173 Fancontrol daemon monitors current temperature of the computer and
174 adjusts fans speed acordingly.
175
176 It is crucial to correctly configure this daemon (via running service
177 fancontrol init) and ensuring, that the temperature levels are set not
178 to burn the insides of the computer!
179
180 %description fancontrol -l pl.UTF-8
181 Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
182 odpowiednio prędkość wiatraków.
183
184 Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
185 uruchomienie service fancontrol init) oraz upewnić się, że progi
186 temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
187
188 %prep
189 %setup -q
190 %patch0 -p1
191 %patch1 -p1
192 %patch2 -p1
193 %patch3 -p1
194
195 %build
196 %{__make} user \
197         CC="%{__cc}" \
198         OPTS="%{rpmcflags}" \
199         SYSFS_SUPPORT:=1 \
200         PROG_EXTRA:="sensord"
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204
205 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
206         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
207
208 %{__make} user_install \
209         DESTDIR=$RPM_BUILD_ROOT \
210         PREFIX=%{_prefix} \
211         ETCDIR=%{_sysconfdir} \
212         LIBDIR=%{_libdir} \
213         MANDIR=%{_mandir} \
214         PROG_EXTRA:="sensord" \
215         SYSFS_SUPPORT:=1
216
217 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
218 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
219 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
220 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
221 install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
222 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
223 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %post   libs -p /sbin/ldconfig
229 %postun libs -p /sbin/ldconfig
230
231 %post
232 if [ -f "%{cmodule}" ]; then
233         /sbin/chkconfig --add sensors_modules
234         %service sensors_modules restart "sensors modules"
235         if [ -f "%{sdaemon}" ]; then
236                 /sbin/chkconfig --add sensors
237                 %service sensors restart "sensors deamon"
238         fi
239 fi
240
241 %preun
242 if [ "$1" = "0" ]; then
243         if [ -f "%{sdaemon}" ]; then
244                 %service sensors stop
245                 /sbin/chkconfig --del sensors
246         fi
247         %service sensors_modules stop
248         /sbin/chkconfig --del sensors_modules
249 fi
250
251 %post config-default
252 if [ "$1" = 1 ]; then
253 cat << EOF
254  *********************************************************************
255  *                                                                   *
256  *  NOTE:                                                            *
257  *  You have to configure sensors to match your motherboard sensors  *
258  *  in  /etc/sensors.conf  and  /etc/sysconfig/sensors_modules. Use  *
259  *  sensors-detect script which  can  help you find proper modules.  *
260  *                                                                   *
261  *********************************************************************
262 EOF
263 fi
264 if [ -f "%{smodule}" ]; then
265         /sbin/chkconfig --add sensors_modules
266         %service sensors_modules restart "sensors modules"
267 fi
268 if [ -f "%{sdaemon}" ]; then
269         /sbin/chkconfig --add sensors
270         %service sensors restart "sensors daemon"
271 fi
272
273 %preun config-default
274 if [ "$1" = "0" ]; then
275         if [ -f "%{sdaemon}" ]; then
276                 %service sensors stop
277                 /sbin/chkconfig --del sensors
278         fi
279         if [ -f "%{smodule}" ]; then
280                 %service sensors_modules stop
281                 /sbin/chkconfig --del sensors_modules
282         fi
283 fi
284
285 %post sensord
286 if [ -f "%{cmodule}" ]; then
287         /sbin/chkconfig --add sensors
288         %service sensors restart "sensors daemon"
289 fi
290
291 %preun sensord
292 if [ "$1" = "0" ]; then
293         %service sensors stop
294         /sbin/chkconfig --del sensors
295 fi
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 README doc/chips
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}/man8/sensors-detect.8*
328 %attr(754,root,root) /etc/rc.d/init.d/sensors_modules
329
330 %files config-default
331 %defattr(644,root,root,755)
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
333 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
334
335 %files libs
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
339
340 %files devel
341 %defattr(644,root,root,755)
342 %doc doc/developers doc/libsensors-API.txt
343 %attr(755,root,root) %{_libdir}/libsensors.so
344 %{_includedir}/sensors
345 %{_mandir}/man3/libsensors.3*
346
347 %files static
348 %defattr(644,root,root,755)
349 %{_libdir}/libsensors.a
350
351 %files sensord
352 %defattr(644,root,root,755)
353 %attr(754,root,root) %{_sbindir}/sensord
354 %attr(754,root,root) /etc/rc.d/init.d/sensors
355 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
356 %{_mandir}/man8/sensord.8*
357
358 %files fancontrol
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_sbindir}/fancontrol
361 %attr(755,root,root) %{_sbindir}/pwmconfig
362 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
363 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
364 %{_mandir}/man8/fancontrol.8*
365 %{_mandir}/man8/pwmconfig.8*
This page took 0.073917 seconds and 4 git commands to generate.