]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
- base R: -libs
[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:       %{name}-libs = %{version}-%{release}
36 Requires:       dev >= 2.9.0-13
37 Requires:       dmidecode
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 Obsoletes:      liblm_sensors1
68
69 %description libs
70 lm_sensors library.
71
72 %description libs -l pl
73 Biblioteka lm_sensors.
74
75 %package devel
76 Summary:        Header files for lm_sensors
77 Summary(pl):    Pliki nag³ówkowe dla lm_sensors
78 Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
79 Summary(ru):    æÁÊÌÙ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
80 Summary(uk):    æÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
81 Group:          Development/Libraries
82 Requires:       %{name}-libs = %{version}-%{release}
83 Obsoletes:      liblm_sensors1-devel
84
85 %description devel
86 Header files for lm_sensors.
87
88 %description devel -l pl
89 Pliki nag³ówkowe dla lm_sensors.
90
91 %description devel -l pt_BR
92 Arquivos necessários ao desenvolvimento de programas que usem o
93 lm_sensors.
94
95 %description devel -l ru
96 ðÁËÅÔ lm_sensors-devel ×ËÌÀÞÁÅÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
97 ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
98
99 %description devel -l uk
100 ðÁËÅÔ lm_sensors-devel Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
101 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
102
103 %package static
104 Summary:        Static libraries for lm_sensors
105 Summary(pl):    Biblioteki statyczne dla lm_sensors
106 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com lm_sensors
107 Summary(ru):    óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
108 Summary(uk):    óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
109 Group:          Development/Libraries
110 Requires:       %{name}-devel = %{version}-%{release}
111
112 %description static
113 Static libraries for lm_sensors.
114
115 %description static -l pl
116 Biblioteki statyczne dla lm_sensors.
117
118 %description static -l pt_BR
119 Bibliotecas estáticas para desenvolvimento com lm_sensors
120
121 %description static -l ru
122 ðÁËÅÔ lm_sensors-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ
123 ÄÌÑ ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
124
125 %description static -l uk
126 ðÁËÅÔ lm_sensors-static Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
127 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
128
129 %package sensord
130 Summary:        Sensord daemon
131 Summary(pl):    Demon sensord
132 Group:          Daemons
133 Requires(post,preun):   /sbin/chkconfig
134 Requires:       %{name} = %{version}-%{release}
135 Requires:       rc-scripts
136
137 %description sensord
138 Sensord daemon.
139
140 %description sensord -l pl
141 Demon sensord.
142
143 %package fancontrol
144 Summary:        Fancontrol daemon
145 Summary(pl):    Demon sterowania wiatraczkami
146 Group:          Daemons
147 Requires(post,preun):   /sbin/chkconfig
148 Requires:       %{name} = %{version}-%{release}
149 Requires:       %{name}-sensord = %{version}-%{release}
150 Requires:       rc-scripts
151
152 %description fancontrol
153 Fancontrol daemon monitors current temperature of the computer and
154 adjusts fans speed acordingly.
155
156 It is crucial to correctly configure this daemon (via running service
157 fancontrol init) and ensuring, that the temperature levels are set not
158 to burn the insides of the computer!
159
160 %description fancontrol -l pl
161 Demon fancontrol monitoruje obecn± temperaturê komputera i ustawia
162 odpowiednio prêdko¶æ wiatraków.
163
164 Kluczowym jest, aby poprawnie skonfigurowaæ tego demona (poprzez
165 uruchomienie service fancontrol init) oraz upewniæ siê, ¿e progi
166 temperatury s± ustawione poprawnie, by nie spaliæ wnêtrza komputera!
167
168 %prep
169 %setup -q
170 %patch0 -p1
171 %patch1 -p1
172 %patch2 -p1
173 %patch3 -p1
174
175 %build
176 %{__make} user \
177         CC="%{__cc}" \
178         OPTS="%{rpmcflags}" \
179         LIBDIR=%{_libdir} \
180         LINUX=/dev/null \
181         LINUX_HEADERS=%{_kernelsrcdir}/include \
182         I2C_HEADERS=/usr/include \
183         PROG_EXTRA:="sensord" \
184         SYSFS_SUPPORT:=1
185
186 %{__make} -C prog/eepromer \
187         CC="%{__cc}" \
188         CFLAGS="%{rpmcflags} -I../../kernel/include"
189
190 %install
191 rm -rf $RPM_BUILD_ROOT
192
193 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
194         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
195
196 %{__make} user_install \
197         DESTDIR=$RPM_BUILD_ROOT \
198         PREFIX=%{_prefix} \
199         ETCDIR=%{_sysconfdir} \
200         LIBDIR=%{_libdir} \
201         MANDIR=%{_mandir} \
202         PROG_EXTRA:="sensord" \
203         LINUX=/dev/null \
204         LINUX_HEADERS=%{_kernelsrcdir}/include \
205         I2C_HEADERS=/usr/include
206
207 install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
208
209 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
210 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
211 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
212 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
213
214 # i2c API for userspace - included in glibc-kernel-headers
215 rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
216
217 %clean
218 rm -rf $RPM_BUILD_ROOT
219
220 %post   libs -p /sbin/ldconfig
221 %postun libs -p /sbin/ldconfig
222
223 %post sensord
224 if [ "$1" = 1 ]; then
225         echo "You have to configure sensors modules in /etc/sysconfig/sensors"
226 fi
227 /sbin/chkconfig --add sensors
228 %service sensors restart "sensors daemon"
229
230 %post fancontrol
231 if [ "$1" = 1 ]; then
232         echo "You have to configure facontrol by running service fancontrol init first."
233 fi
234 /sbin/chkconfig --add sensors
235 %service fancontrol restart "sensors daemon"
236
237 %preun sensord
238 if [ "$1" = "0" ]; then
239         %service sensors stop
240         /sbin/chkconfig --del sensors
241 fi
242
243 %preun fancontrol
244 if [ "$1" = "0" ]; then
245         %service sensors stop
246         /sbin/chkconfig --del sensors
247 fi
248
249 %files
250 %defattr(644,root,root,755)
251 %doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
252 %doc doc/{FAQ,donations,fan-divisors,progs,temperature-sensors,*html,vid}
253 %doc prog/{config,daemon,eepromer/README*,matorb,maxilife}
254 %attr(755,root,root) %{_bindir}/ddcmon
255 %attr(755,root,root) %{_bindir}/decode-*.pl
256 %attr(755,root,root) %{_bindir}/sensors
257 %attr(755,root,root) %{_sbindir}/eeprom*
258 %attr(755,root,root) %{_sbindir}/i2c*
259 %ifarch %{ix86} %{x8664}
260 %attr(755,root,root) %{_sbindir}/isadump
261 %attr(755,root,root) %{_sbindir}/isaset
262 %{_mandir}/man8/isadump.8*
263 %{_mandir}/man8/isaset.8*
264 %endif
265 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
266 %{_mandir}/man1/sensors.1*
267 %{_mandir}/man5/sensors.conf.5*
268 %{_mandir}/man8/i2c*.8*
269
270 %files libs
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/lib*.so.*.*
273
274 %files devel
275 %defattr(644,root,root,755)
276 %doc doc/{developers,kernel}
277 %attr(755,root,root) %{_libdir}/lib*.so
278 %{_includedir}/sensors
279 %{_includedir}/linux/sensors.h
280 %{_mandir}/man3/*
281
282 %files static
283 %defattr(644,root,root,755)
284 %{_libdir}/libsensors.a
285
286 %files sensord
287 %defattr(644,root,root,755)
288 %attr(754,root,root) %{_sbindir}/sensord
289 %attr(755,root,root) %{_sbindir}/sensors-detect
290 %attr(754,root,root) /etc/rc.d/init.d/sensors
291 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
292 %{_mandir}/man8/sensors-detect.8*
293 %{_mandir}/man8/sensord.8*
294
295 %files fancontrol
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_sbindir}/fancontrol
298 %attr(755,root,root) %{_sbindir}/pwmconfig
299 %attr(754,root,root) /etc/rc.d/init.d/fancontrol
300 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
301 %{_mandir}/man8/fancontrol.8*
302 %{_mandir}/man8/pwmconfig.8*
This page took 0.091104 seconds and 4 git commands to generate.