]> git.pld-linux.org Git - packages/lm_sensors.git/blame_incremental - lm_sensors.spec
- libsysfs is no longer used
[packages/lm_sensors.git] / lm_sensors.spec
... / ...
CommitLineData
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
11Summary: Hardware health monitoring
12Summary(pl.UTF-8): Monitor stanu sprzętu
13Summary(pt_BR.UTF-8): Ferramentas para monitoração do hardware
14Summary(ru.UTF-8): Утилиты для мониторинга аппаратуры
15Summary(uk.UTF-8): Утиліти для моніторингу апаратури
16Name: lm_sensors
17Version: 3.0.2
18Release: 1
19License: GPL v2+
20Group: Applications/System
21Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
22# Source0-md5: 5b210ba9cc01f00161c438fd618484e5
23Source1: sensors.init
24Source2: sensors.sysconfig
25Source3: fancontrol.init
26Source4: fancontrol.sysconfig
27Source5: sensors.sh
28Source6: sensors_modules.init
29Source7: sensors_modules.sysconfig
30Patch0: %{name}-ppc.patch
31Patch1: %{name}-iconv-in-libc.patch
32Patch2: %{name}-sensors-detect-PATH.patch
33Patch3: %{name}-make.patch
34URL: http://www.lm-sensors.org/
35BuildRequires: bison
36BuildRequires: flex >= 2.5.1
37BuildRequires: perl-modules >= 1:5.6
38BuildRequires: rpm-perlprov >= 3.0.3-16
39BuildRequires: rpmbuild(macros) >= 1.268
40BuildRequires: rrdtool-devel >= 1.2.10
41Requires: %{name}-config
42Requires: %{name}-libs = %{version}-%{release}
43Requires: dev >= 2.9.0-13
44Requires: dmidecode
45Requires: uname(release) >= 2.6.5
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49Tools for monitoring the hardware health of Linux systems containing
50hardware health monitoring hardware such as the LM78 and LM75.
51
52%description -l pl.UTF-8
53Narzędzie do monitorowania sprzętu w systemach linuksowych
54wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
55
56%description -l pt_BR.UTF-8
57Ferramentas para monitoração do hardware. Contém uma coleção de
58módulos para acesso genérico ao barramento SMBus e monitoração de
59hardware.
60
61%description -l ru.UTF-8
62Пакет lm_sensors содержит набор модулей для стандартного доступа к
63SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
64поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
65
66%description -l uk.UTF-8
67Пакет lm_sensors містить набір модулів для стандартного доступу до
68SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
69яка відсутня у стандартних старих ядрах 2.2.XX!
70
71%package libs
72Summary: lm_sensors library
73Summary(pl.UTF-8): Biblioteka lm_sensors
74Group: Libraries
75Obsoletes: liblm_sensors1
76Conflicts: lm_sensors <= 2.9.2-2
77
78%description libs
79lm_sensors library.
80
81%description libs -l pl.UTF-8
82Biblioteka lm_sensors.
83
84%package devel
85Summary: Header files for lm_sensors
86Summary(pl.UTF-8): Pliki nagłówkowe dla lm_sensors
87Summary(pt_BR.UTF-8): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
88Summary(ru.UTF-8): Файлы разработчика для программ, использующих lm_sensors
89Summary(uk.UTF-8): Файли програміста для програм, які використовують lm_sensors
90Group: Development/Libraries
91Requires: %{name}-libs = %{version}-%{release}
92Obsoletes: liblm_sensors1-devel
93
94%description devel
95Header files for lm_sensors.
96
97%description devel -l pl.UTF-8
98Pliki nagłówkowe dla lm_sensors.
99
100%description devel -l pt_BR.UTF-8
101Arquivos necessários ao desenvolvimento de programas que usem o
102lm_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
113Summary: Static libraries for lm_sensors
114Summary(pl.UTF-8): Biblioteki statyczne dla lm_sensors
115Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com lm_sensors
116Summary(ru.UTF-8): Статическая библиотека для программ, использующих lm_sensors
117Summary(uk.UTF-8): Статична бібліотека для програм, які використовують lm_sensors
118Group: Development/Libraries
119Requires: %{name}-devel = %{version}-%{release}
120
121%description static
122Static libraries for lm_sensors.
123
124%description static -l pl.UTF-8
125Biblioteki statyczne dla lm_sensors.
126
127%description static -l pt_BR.UTF-8
128Bibliotecas 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
139Summary: Default sensors configuration files
140Summary(pl.UTF-8): Domyślne pliki konfiguracyjne lm_sensors
141Group: Applications/System
142Requires: %{name} = %{version}-%{release}
143Provides: %{name}-config
144
145%description config-default
146Default configuration files for lm_sensors.
147
148%description config-default -l pl.UTF-8
149Domyślne pliki konfiguracyjne lm_sensors.
150
151%package sensord
152Summary: Sensord daemon
153Summary(pl.UTF-8): Demon sensord
154Group: Daemons
155Requires(post,preun): /sbin/chkconfig
156Requires: %{name} = %{version}-%{release}
157Requires: %{name}-config
158Requires: rc-scripts
159
160%description sensord
161Sensord daemon.
162
163%description sensord -l pl.UTF-8
164Demon sensord.
165
166%package fancontrol
167Summary: Fancontrol daemon
168Summary(pl.UTF-8): Demon sterowania wiatraczkami
169Group: Daemons
170Requires(post,preun): /sbin/chkconfig
171Requires: %{name} = %{version}-%{release}
172Requires: %{name}-sensord = %{version}-%{release}
173Requires: rc-scripts
174
175%description fancontrol
176Fancontrol daemon monitors current temperature of the computer and
177adjusts fans speed acordingly.
178
179It is crucial to correctly configure this daemon (via running service
180fancontrol init) and ensuring, that the temperature levels are set not
181to burn the insides of the computer!
182
183%description fancontrol -l pl.UTF-8
184Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
185odpowiednio prędkość wiatraków.
186
187Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
188uruchomienie service fancontrol init) oraz upewnić się, że progi
189temperatury 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
206rm -rf $RPM_BUILD_ROOT
207
208install -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
220install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
221install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
222install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
223install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
224install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
225install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
226install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
227
228%clean
229rm -rf $RPM_BUILD_ROOT
230
231%post libs -p /sbin/ldconfig
232%postun libs -p /sbin/ldconfig
233
234%post
235if [ -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
242fi
243
244%preun
245if [ "$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
252fi
253
254%post config-default
255if [ "$1" = 1 ]; then
256cat << 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 *********************************************************************
265EOF
266fi
267if [ -f "%{smodule}" ]; then
268 /sbin/chkconfig --add sensors_modules
269 %service sensors_modules restart "sensors modules"
270fi
271if [ -f "%{sdaemon}" ]; then
272 /sbin/chkconfig --add sensors
273 %service sensors restart "sensors daemon"
274fi
275
276%preun config-default
277if [ "$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
286fi
287
288%post sensord
289if [ -f "%{cmodule}" ]; then
290 /sbin/chkconfig --add sensors
291 %service sensors restart "sensors daemon"
292fi
293
294%preun sensord
295if [ "$1" = "0" ]; then
296 %service sensors stop
297 /sbin/chkconfig --del sensors
298fi
299
300%post fancontrol
301if [ "$1" = 1 ]; then
302 echo "You have to configure fancontrol by running service fancontrol init first."
303fi
304/sbin/chkconfig --add fancontrol
305%service fancontrol restart "fancontrol daemon"
306
307%preun fancontrol
308if [ "$1" = "0" ]; then
309 %service fancontrol stop
310 /sbin/chkconfig --del fancontrol
311fi
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*
This page took 0.064278 seconds and 4 git commands to generate.