3 # _without_dist_kernel without kernel for distributions
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)
7 %define smpstr %{?_with_smp:-smp}
8 %define smp %{?_with_smp:1}%{!?_with_smp:0}
10 Summary: Hardware health monitoring
11 Summary(pl): Monitor stanu sprzêtu
16 Group: Applications/System
17 Group(de): Applikationen/System
18 Group(pl): Aplikacje/System
19 Source0: http://www.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
21 Source2: sensors.sysconfig
22 Patch0: %{name}-make.patch
23 URL: http://www.netroedge.com/~lm78/
24 BuildRequires: flex >= 2.5.1
26 BuildRequires: i2c-devel >= 2.6.0
27 PreReq: /sbin/chkconfig
28 Requires: %{name}-modules = %{version}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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 Linuxowych wyposa¿onych
37 w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
40 Summary: Header files for lm_sensors
41 Summary(pl): Pliki nag³ówkowe dla lm_sensors
42 Group: Development/Libraries
43 Group(de): Entwicklung/Libraries
44 Group(es): Desarrollo/Bibliotecas
45 Group(fr): Development/Librairies
46 Group(pl): Programowanie/Biblioteki
47 Group(pt_BR): Desenvolvimento/Bibliotecas
48 Group(ru): òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
49 Group(uk): òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
50 Requires: %{name} = %{version}
53 Header files for lm_sensors.
55 %description devel -l pl
56 Pliki nag³ówkowe dla lm_sensors.
59 Summary: Static libraries for lm_sensors
60 Summary(pl): Biblioteki statyczne dla lm_sensors
61 Group: Development/Libraries
62 Group(de): Entwicklung/Libraries
63 Group(es): Desarrollo/Bibliotecas
64 Group(fr): Development/Librairies
65 Group(pl): Programowanie/Biblioteki
66 Group(pt_BR): Desenvolvimento/Bibliotecas
67 Group(ru): òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
68 Group(uk): òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
69 Requires: %{name}-devel = %{version}
72 Static libraries for lm_sensors.
74 %description static -l pl
75 Biblioteki statyczne dla lm_sensors.
77 %package -n kernel%{smpstr}-misc-lm_sensors
78 Summary: Kernel modules for various buses and monitor chips
79 Summary(pl): Modu³y j±dra dla ró¿nego rodzaju sensorów
80 Group: Applications/System
81 Group(de): Applikationen/System
82 Group(pl): Aplikacje/System
83 Release: %{release}@%{_kernel_ver_str}
85 Requires: i2c >= 2.6.0
86 %{?!_without_dist_kernel:Conflicts: kernel < %{_kernel_ver}, kernel > %{_kernel_ver}}
87 %{?!_without_dist_kernel:Conflicts: kernel-%{?_with_smp:up}%{!?_with_smp:smp}}
88 Obsoletes: lm_sensors-modules
89 Provides: lm_sensors-modules = %{version}
91 %description -n kernel%{smpstr}-misc-lm_sensors
92 Kernel modules for various buses and monitor chips.
94 %description -n kernel%{smpstr}-misc-lm_sensors -l pl
95 Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
103 SMP="-D__KERNEL_SMP=1"
106 OPTS="%{rpmcflags} $SMP" \
108 LINUX_HEADERS=%{_kernelsrcdir}/include \
109 I2C_HEADERS=%{_kernelsrcdir}/include \
113 rm -rf $RPM_BUILD_ROOT
116 DESTDIR=$RPM_BUILD_ROOT \
118 ETCDIR=%{_sysconfdir} \
120 MODDIR=/lib/modules/%{_kernel_ver}/misc
122 install -d $RPM_BUILD_ROOT%{_sbindir}
123 install -d $RPM_BUILD_ROOT%{_mandir}/man8
124 install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir}
125 install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8
127 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
128 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
129 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
131 gzip -9nf BACKGROUND BUGS CHANGES README README.thinkpad TODO
132 find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf
135 rm -rf $RPM_BUILD_ROOT
139 /sbin/chkconfig --add sensors
140 if [ -f /var/lock/subsys/sensors ]; then
141 /etc/rc.d/init.d/sensors restart >&2
143 echo "You have to configure sensors modules."
144 echo "Please edit /etc/sysconfig/sensors file according to your hardware."
146 echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
150 if [ "$1" = "0" ]; then
151 if [ -f /var/lock/subsys/sensors ]; then
152 /etc/rc.d/init.d/sensors stop >&2
154 /sbin/chkconfig --del sensors
160 %post -n kernel%{smpstr}-misc-lm_sensors
163 %postun -n kernel%{smpstr}-misc-lm_sensors
167 %defattr(644,root,root,755)
169 %doc doc/*.gz doc/*.html doc/busses doc/chips
170 %attr(755,root,root) %{_bindir}/sensors
171 %attr(755,root,root) %{_sbindir}/sensors-detect
172 %attr(754,root,root) %{_sbindir}/sensord
173 %attr(754,root,root) /etc/rc.d/init.d/sensors
174 %attr(755,root,root) %{_libdir}/lib*.so.*.*
175 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf
176 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors
182 %defattr(644,root,root,755)
183 %doc doc/developers doc/kernel
184 %attr(755,root,root) %{_libdir}/lib*.so
185 %{_includedir}/sensors
186 %{_includedir}/linux/*
190 %defattr(644,root,root,755)
191 %{_libdir}/libsensors.a
193 %files -n kernel%{smpstr}-misc-lm_sensors
194 %defattr(644,root,root,755)
195 /lib/modules/*/misc/*