3 # _without_dist_kernel without kernel for distributions
4 %include /usr/lib/rpm/macros.perl
5 %define _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
6 %define _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
9 Summary: Hardware health monitoring
10 Summary(pl): Monitor stanu sprzêtu
11 Summary(pt_BR): Ferramentas para monitoração do hardware
16 Group: Applications/System
17 Source0: http://www.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
19 Source2: sensors.sysconfig
20 Patch0: %{name}-make.patch
21 URL: http://www.netroedge.com/~lm78/
23 BuildRequires: flex >= 2.5.1
24 BuildRequires: perl-modules >= 5.6
25 %{!?_without_dist_kernel:BuildRequires: i2c-devel >= 2.6.0}
26 PreReq: /sbin/chkconfig
27 PreReq: /sbin/ldconfig
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Obsoletes: liblm_sensors1
32 Tools for monitoring the hardware health of Linux systems containing
33 hardware health monitoring hardware such as the LM78 and LM75.
36 Narzêdzie do monitorowania sprzêtu w systemach Linuksowych
37 wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
40 Ferramentas para monitoração do hardware. Contém uma coleção de
41 módulos para acesso genérico ao barramento SMBus e monitoração de
45 Summary: Header files for lm_sensors
46 Summary(pl): Pliki nag³ówkowe dla lm_sensors
47 Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
48 Group: Development/Libraries
49 Requires: %{name} = %{version}
50 Obsoletes: liblm_sensors1-devel
53 Header files for lm_sensors.
55 %description devel -l pl
56 Pliki nag³ówkowe dla lm_sensors.
58 %description devel -l pt_BR
59 Arquivos necessários ao desenvolvimento de programas que usem o
63 Summary: Static libraries for lm_sensors
64 Summary(pl): Biblioteki statyczne dla lm_sensors
65 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com lm_sensors
66 Group: Development/Libraries
67 Requires: %{name}-devel = %{version}
70 Static libraries for lm_sensors.
72 %description static -l pl
73 Biblioteki statyczne dla lm_sensors.
75 %description static -l pt_BR
76 Bibliotecas estáticas para desenvolvimento com lm_sensors
78 %package -n kernel-misc-%{name}
79 Summary: Kernel modules for various buses and monitor chips
80 Summary(pl): Modu³y j±dra dla ró¿nego rodzaju sensorów
81 Group: Applications/System
82 Release: %{_rel}@%{_kernel_ver_str}
84 %{!?_without_dist_kernel:%requires_releq_kernel_up}
85 %{!?_without_dist_kernel:Requires: i2c >= 2.6.0}
86 Provides: %{name}-modules = %{version}
87 Obsoletes: %{name}-modules
89 %description -n kernel-misc-%{name}
90 Kernel modules for various buses and monitor chips.
92 %description -n kernel-misc-%{name} -l pl
93 Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
95 %package -n kernel-smp-misc-%{name}
96 Summary: Kernel modules for various buses and monitor chips
97 Summary(pl): Modu³y j±dra dla ró¿nego rodzaju sensorów
98 Group: Applications/System
99 Release: %{_rel}@%{_kernel_ver_str}
101 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
102 %{!?_without_dist_kernel:Requires: i2c >= 2.6.0}
103 Provides: %{name}-modules = %{version}
104 Obsoletes: %{name}-modules
106 %description -n kernel-smp-misc-%{name}
107 Kernel SMP modules for various buses and monitor chips.
109 %description -n kernel-smp-misc-%{name} -l pl
110 Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
119 OPTS="%{rpmcflags}" \
121 LINUX_HEADERS=%{_kernelsrcdir}/include \
122 I2C_HEADERS=%{_kernelsrcdir}/include \
125 %{__make} install-kernel \
126 MODDIR=kernel-up-modules
127 %{__make} install-kernel-busses \
128 MODDIR=kernel-up-modules
129 %{__make} install-kernel-chips \
130 MODDIR=kernel-up-modules
136 OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
138 LINUX_HEADERS=%{_kernelsrcdir}/include \
139 I2C_HEADERS=%{_kernelsrcdir}/include \
143 rm -rf $RPM_BUILD_ROOT
144 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
145 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/lib/modules/%{_kernel_ver}/misc}
148 DESTDIR=$RPM_BUILD_ROOT \
150 ETCDIR=%{_sysconfdir} \
152 MODDIR=/lib/modules/%{_kernel_ver}smp/misc
154 install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir}
155 install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8
157 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
158 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
160 install kernel-up-modules/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
162 gzip -9nf BACKGROUND BUGS CHANGES README README.thinkpad TODO
163 find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf
166 rm -rf $RPM_BUILD_ROOT
170 /sbin/chkconfig --add sensors
171 if [ -f /var/lock/subsys/sensors ]; then
172 /etc/rc.d/init.d/sensors restart >&2
174 echo "You have to configure sensors modules."
175 echo "Please edit /etc/sysconfig/sensors file according to your hardware."
177 echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
181 if [ "$1" = "0" ]; then
182 if [ -f /var/lock/subsys/sensors ]; then
183 /etc/rc.d/init.d/sensors stop >&2
185 /sbin/chkconfig --del sensors
188 %postun -p /sbin/ldconfig
190 %post -n kernel-misc-%{name}
193 %post -n kernel-smp-misc-%{name}
196 %postun -n kernel-misc-%{name}
199 %postun -n kernel-smp-misc-%{name}
203 %defattr(644,root,root,755)
205 %doc doc/*.gz doc/*.html doc/busses doc/chips
206 %attr(755,root,root) %{_bindir}/sensors
207 %attr(755,root,root) %{_sbindir}/sensors-detect
208 %attr(754,root,root) %{_sbindir}/sensord
209 %attr(754,root,root) /etc/rc.d/init.d/sensors
210 %attr(755,root,root) %{_libdir}/lib*.so.*.*
211 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf
212 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors
218 %defattr(644,root,root,755)
219 %doc doc/developers doc/kernel
220 %attr(755,root,root) %{_libdir}/lib*.so
221 %{_includedir}/sensors
222 %{_includedir}/linux/*
226 %defattr(644,root,root,755)
227 %{_libdir}/libsensors.a
229 %files -n kernel-misc-%{name}
230 %defattr(644,root,root,755)
231 /lib/modules/%{_kernel_ver}/misc/*
233 %files -n kernel-smp-misc-%{name}
234 %defattr(644,root,root,755)
235 /lib/modules/%{_kernel_ver}smp/misc/*