]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
- sensors-detect moved to -sensord as it writes /etc/sysconfig/sensors
[packages/lm_sensors.git] / lm_sensors.spec
1 # TODO
2 # - unpackaged:
3 #   /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
4 # - a big trigger warning how to use fancontrol and to init it first
5 #
6 %include        /usr/lib/rpm/macros.perl
7 Summary:        Hardware health monitoring
8 Summary(pl):    Monitor stanu sprzêtu
9 Summary(pt_BR): Ferramentas para monitoração do hardware
10 Summary(ru):    õÔÉÌÉÔÙ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ ÁÐÐÁÒÁÔÕÒÙ
11 Summary(uk):    õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
12 Name:           lm_sensors
13 Version:        2.10.1
14 Release:        1
15 License:        GPL
16 Group:          Applications/System
17 Source0:        http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
18 # Source0-md5:  cdc857b78e813b88cbf8be92441aa299
19 Source1:        sensors.init
20 Source2:        sensors.sysconfig
21 Source3:        fancontrol.init
22 Source4:        fancontrol.sysconfig
23 Patch0:         %{name}-make.patch
24 Patch1:         %{name}-ppc.patch
25 Patch2:         %{name}-iconv-in-libc.patch
26 Patch3:         %{name}-sensors-detect-PATH.patch
27 URL:            http://www.lm-sensors.nu/
28 BuildRequires:  bison
29 BuildRequires:  flex >= 2.5.1
30 BuildRequires:  perl-modules >= 5.6
31 BuildRequires:  rpm-perlprov >= 3.0.3-16
32 BuildRequires:  rpmbuild(macros) >= 1.268
33 BuildRequires:  rrdtool-devel >= 1.2.10
34 BuildRequires:  sysfsutils-devel
35 Requires:       dev >= 2.9.0-13
36 Requires:       dmidecode
37 Obsoletes:      liblm_sensors1
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Tools for monitoring the hardware health of Linux systems containing
42 hardware health monitoring hardware such as the LM78 and LM75.
43
44 %description -l pl
45 Narzêdzie do monitorowania sprzêtu w systemach linuksowych
46 wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
47
48 %description -l pt_BR
49 Ferramentas para monitoração do hardware. Contém uma coleção de
50 módulos para acesso genérico ao barramento SMBus e monitoração de
51 hardware.
52
53 %description -l ru
54 ðÁËÅÔ lm_sensors ÓÏÄÅÒÖÉÔ ÎÁÂÏÒ ÍÏÄÕÌÅÊ ÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÁ Ë
55 SMBus É ÍÏÎÉÔÏÒÉÎÇÁ. ÷îéíáîéå: ÄÌÑ ÜÔÏÇÏ ÎÅÏÂÈÏÄÉÍÁ ÓÐÅÃÉÁÌØÎÁÑ
56 ÐÏÄÄÅÒÖËÁ, ÏÔÓÕÔÓÔ×ÕÀÝÁÑ × ÓÔÁÎÄÁÒÔÎÙÈ ÓÔÁÒÙÈ ÑÄÒÁÈ 2.2.XX!
57
58 %description -l uk
59 ðÁËÅÔ lm_sensors Í¦ÓÔÉÔØ ÎÁ¦ҠÍÏÄÕ̦נÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÕ ÄÏ
60 SMBus ÔÁ ÍÏΦÔÏÒÉÎÇÕ. õ÷áçá: ÄÌÑ ÃØÏÇÏ ÐÏÔÒ¦ÂÎÁ ÓÐÅæÁÌØÎÁ Ð¦ÄÔÒÉÍËÁ,
61 ÑËÁ ×¦ÄÓÕÔÎÑ Õ ÓÔÁÎÄÁÒÔÎÉÈ ÓÔÁÒÉÈ ÑÄÒÁÈ 2.2.XX!
62
63 %package libs
64 Summary:        lm_sensors library
65 Summary(pl):    Biblioteka lm_sensors
66 Group:          Libraries
67
68 %description libs
69 lm_sensors library.
70
71 %description libs -l pl
72 Biblioteka lm_sensors.
73
74 %package devel
75 Summary:        Header files for lm_sensors
76 Summary(pl):    Pliki nag³ówkowe dla lm_sensors
77 Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
78 Summary(ru):    æÁÊÌÙ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
79 Summary(uk):    æÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
80 Group:          Development/Libraries
81 Requires:       %{name}-libs = %{version}-%{release}
82 Obsoletes:      liblm_sensors1-devel
83
84 %description devel
85 Header files for lm_sensors.
86
87 %description devel -l pl
88 Pliki nag³ówkowe dla lm_sensors.
89
90 %description devel -l pt_BR
91 Arquivos necessários ao desenvolvimento de programas que usem o
92 lm_sensors.
93
94 %description devel -l ru
95 ðÁËÅÔ lm_sensors-devel ×ËÌÀÞÁÅÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
96 ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
97
98 %description devel -l uk
99 ðÁËÅÔ lm_sensors-devel Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
100 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
101
102 %package static
103 Summary:        Static libraries for lm_sensors
104 Summary(pl):    Biblioteki statyczne dla lm_sensors
105 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com lm_sensors
106 Summary(ru):    óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
107 Summary(uk):    óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
108 Group:          Development/Libraries
109 Requires:       %{name}-devel = %{version}-%{release}
110
111 %description static
112 Static libraries for lm_sensors.
113
114 %description static -l pl
115 Biblioteki statyczne dla lm_sensors.
116
117 %description static -l pt_BR
118 Bibliotecas estáticas para desenvolvimento com lm_sensors
119
120 %description static -l ru
121 ðÁËÅÔ lm_sensors-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ
122 ÄÌÑ ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
123
124 %description static -l uk
125 ðÁËÅÔ lm_sensors-static Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
126 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
127
128 %package sensord
129 Summary:        Sensord daemon
130 Summary(pl):    Demon sensord
131 Group:          Daemons
132 Requires(post,preun):   /sbin/chkconfig
133 Requires:       %{name} = %{version}-%{release}
134 Requires:       rc-scripts
135
136 %description sensord
137 Sensord daemon.
138
139 %description sensord -l pl
140 Demon sensord.
141
142 %package fancontrol
143 Summary:        Fancontrol daemon
144 Summary(pl):    Demon sterowania wiatraczkami
145 Group:          Daemons
146 Requires(post,preun):   /sbin/chkconfig
147 Requires:       %{name} = %{version}-%{release}
148 Requires:       %{name}-sensord = %{version}-%{release}
149 Requires:       rc-scripts
150
151 %description fancontrol
152 Fancontrol daemon monitors current temperature of the computer and
153 adjusts fans speed acordingly.
154
155 It is crucial to correctly configure this daemon (via running service
156 fancontrol init) and ensuring, that the temperature levels are set not
157 to burn the insides of the computer!
158
159 %description fancontrol -l pl
160 Demon fancontrol monitoruje obecn± temperaturê komputera i ustawia
161 odpowiednio prêdko¶æ wiatraków.
162
163 Kluczowym jest, aby poprawnie skonfigurowaæ tego demona (poprzez
164 uruchomienie service fancontrol init) oraz upewniæ siê, ¿e progi
165 temperatury s± ustawione poprawnie, by nie spaliæ wnêtrza komputera!
166
167 %prep
168 %setup -q
169 %patch0 -p1
170 %patch1 -p1
171 %patch2 -p1
172 %patch3 -p1
173
174 %build
175 %{__make} user \
176         CC="%{__cc}" \
177         OPTS="%{rpmcflags}" \
178         LIBDIR=%{_libdir} \
179         LINUX=/dev/null \
180         LINUX_HEADERS=%{_kernelsrcdir}/include \
181         I2C_HEADERS=/usr/include \
182         PROG_EXTRA:="sensord" \
183         SYSFS_SUPPORT:=1
184
185 %{__make} -C prog/eepromer \
186         CC="%{__cc}" \
187         CFLAGS="%{rpmcflags} -I../../kernel/include"
188
189 %install
190 rm -rf $RPM_BUILD_ROOT
191
192 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
193         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
194
195 %{__make} user_install \
196         DESTDIR=$RPM_BUILD_ROOT \
197         PREFIX=%{_prefix} \
198         ETCDIR=%{_sysconfdir} \
199         LIBDIR=%{_libdir} \
200         MANDIR=%{_mandir} \
201         PROG_EXTRA:="sensord" \
202         LINUX=/dev/null \
203         LINUX_HEADERS=%{_kernelsrcdir}/include \
204         I2C_HEADERS=/usr/include
205
206 install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
207
208 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
209 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
210 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
211 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
212
213 # i2c API for userspace - included in glibc-kernel-headers
214 rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
215
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post   libs -p /sbin/ldconfig
220 %postun libs -p /sbin/ldconfig
221
222 %post sensord
223 if [ "$1" = 1 ]; then
224         echo "You have to configure sensors modules in /etc/sysconfig/sensors"
225 fi
226 /sbin/chkconfig --add sensors
227 %service sensors restart "sensors daemon"
228
229 %post fancontrol
230 if [ "$1" = 1 ]; then
231         echo "You have to configure facontrol by running service fancontrol init first."
232 fi
233 /sbin/chkconfig --add sensors
234 %service fancontrol restart "sensors daemon"
235
236 %preun sensord
237 if [ "$1" = "0" ]; then
238         %service sensors stop
239         /sbin/chkconfig --del sensors
240 fi
241
242 %preun fancontrol
243 if [ "$1" = "0" ]; then
244         %service sensors stop
245         /sbin/chkconfig --del sensors
246 fi
247
248 %files
249 %defattr(644,root,root,755)
250 %doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
251 %doc doc/{FAQ,donations,fan-divisors,progs,temperature-sensors,*html,vid}
252 %doc prog/{config,daemon,eepromer/README*,matorb,maxilife}
253 %attr(755,root,root) %{_bindir}/ddcmon
254 %attr(755,root,root) %{_bindir}/decode-*.pl
255 %attr(755,root,root) %{_bindir}/sensors
256 %attr(755,root,root) %{_sbindir}/eeprom*
257 %attr(755,root,root) %{_sbindir}/i2c*
258 %ifarch %{ix86} %{x8664}
259 %attr(755,root,root) %{_sbindir}/isadump
260 %attr(755,root,root) %{_sbindir}/isaset
261 %{_mandir}/man8/isadump.8*
262 %{_mandir}/man8/isaset.8*
263 %endif
264 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
265 %{_mandir}/man1/sensors.1*
266 %{_mandir}/man5/sensors.conf.5*
267 %{_mandir}/man8/i2c*.8*
268
269 %files libs
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/lib*.so.*.*
272
273 %files devel
274 %defattr(644,root,root,755)
275 %doc doc/{developers,kernel}
276 %attr(755,root,root) %{_libdir}/lib*.so
277 %{_includedir}/sensors
278 %{_includedir}/linux/sensors.h
279 %{_mandir}/man3/*
280
281 %files static
282 %defattr(644,root,root,755)
283 %{_libdir}/libsensors.a
284
285 %files sensord
286 %defattr(644,root,root,755)
287 %attr(754,root,root) %{_sbindir}/sensord
288 %attr(755,root,root) %{_sbindir}/sensors-detect
289 %attr(754,root,root) /etc/rc.d/init.d/sensors
290 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
291 %{_mandir}/man8/sensors-detect.8*
292 %{_mandir}/man8/sensord.8*
293
294 %files fancontrol
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_sbindir}/fancontrol
297 %attr(755,root,root) %{_sbindir}/pwmconfig
298 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
299 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
300 %{_mandir}/man8/fancontrol.8*
301 %{_mandir}/man8/pwmconfig.8*
This page took 0.083931 seconds and 3 git commands to generate.