]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
BR: perl-modules
[packages/lm_sensors.git] / lm_sensors.spec
1
2 # conditional build
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)
7 %define         _rel 10
8
9 Summary:        Hardware health monitoring
10 Summary(pl):    Monitor stanu sprzêtu
11 Summary(pt_BR): Ferramentas para monitoração do hardware
12 Name:           lm_sensors
13 Version:        2.6.2
14 Release:        %{_rel}
15 License:        GPL
16 Group:          Applications/System
17 Source0:        http://www.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
18 Source1:        sensors.init
19 Source2:        sensors.sysconfig
20 Patch0:         %{name}-make.patch
21 URL:            http://www.netroedge.com/~lm78/
22 BuildRequires:  bison
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
30
31 %description
32 Tools for monitoring the hardware health of Linux systems containing
33 hardware health monitoring hardware such as the LM78 and LM75.
34
35 %description -l pl
36 Narzêdzie do monitorowania sprzêtu w systemach Linuksowych
37 wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
38
39 %description -l pt_BR
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
42 hardware.
43
44 %package devel
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
51
52 %description devel
53 Header files for lm_sensors.
54
55 %description devel -l pl
56 Pliki nag³ówkowe dla lm_sensors.
57
58 %description devel -l pt_BR
59 Arquivos necessários ao desenvolvimento de programas que usem o
60 lm_sensors.
61
62 %package static
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}
68
69 %description static
70 Static libraries for lm_sensors.
71
72 %description static -l pl
73 Biblioteki statyczne dla lm_sensors.
74
75 %description static -l pt_BR
76 Bibliotecas estáticas para desenvolvimento com lm_sensors
77
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}
83 Prereq:         /sbin/depmod
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
88
89 %description -n kernel-misc-%{name}
90 Kernel modules for various buses and monitor chips.
91
92 %description -n kernel-misc-%{name} -l pl
93 Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
94
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}
100 Prereq:         /sbin/depmod
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
105
106 %description -n kernel-smp-misc-%{name}
107 Kernel SMP modules for various buses and monitor chips.
108
109 %description -n kernel-smp-misc-%{name} -l pl
110 Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
111
112 %prep
113 %setup -q
114 %patch0 -p1
115
116 %build
117 #up
118 %{__make} \
119         OPTS="%{rpmcflags}" \
120         LINUX=/dev/null \
121         LINUX_HEADERS=%{_kernelsrcdir}/include \
122         I2C_HEADERS=%{_kernelsrcdir}/include \
123         SMP=0
124
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
131
132 %{__make} clean
133
134 #smp
135 %{__make} \
136         OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
137         LINUX=/dev/null \
138         LINUX_HEADERS=%{_kernelsrcdir}/include \
139         I2C_HEADERS=%{_kernelsrcdir}/include \
140         SMP=1
141
142 %install
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}
146
147 %{__make} install \
148         DESTDIR=$RPM_BUILD_ROOT \
149         PREFIX=%{_prefix} \
150         ETCDIR=%{_sysconfdir} \
151         MANDIR=%{_mandir} \
152         MODDIR=/lib/modules/%{_kernel_ver}smp/misc
153
154 install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir}
155 install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8
156
157 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
158 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
159
160 install kernel-up-modules/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
161
162 gzip -9nf BACKGROUND BUGS CHANGES README README.thinkpad TODO
163 find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %post
169 /sbin/ldconfig
170 /sbin/chkconfig --add sensors
171 if [ -f /var/lock/subsys/sensors ]; then
172         /etc/rc.d/init.d/sensors restart >&2
173 else
174         echo "You have to configure sensors modules."
175         echo "Please edit /etc/sysconfig/sensors file according to your hardware."
176         echo
177         echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
178 fi
179
180 %preun
181 if [ "$1" = "0" ]; then
182         if [ -f /var/lock/subsys/sensors ]; then
183                 /etc/rc.d/init.d/sensors stop >&2
184         fi
185         /sbin/chkconfig --del sensors
186 fi
187
188 %postun -p /sbin/ldconfig
189
190 %post -n kernel-misc-%{name}
191 /sbin/depmod -a
192
193 %post -n kernel-smp-misc-%{name}
194 /sbin/depmod -a
195
196 %postun -n kernel-misc-%{name}
197 /sbin/depmod -a
198
199 %postun -n kernel-smp-misc-%{name}
200 /sbin/depmod -a
201
202 %files
203 %defattr(644,root,root,755)
204 %doc *.gz
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
213 %{_mandir}/man1/*
214 %{_mandir}/man5/*
215 %{_mandir}/man8/*
216
217 %files devel
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/*
223 %{_mandir}/man3/*
224
225 %files static
226 %defattr(644,root,root,755)
227 %{_libdir}/libsensors.a
228
229 %files -n kernel-misc-%{name}
230 %defattr(644,root,root,755)
231 /lib/modules/%{_kernel_ver}/misc/*
232
233 %files -n kernel-smp-misc-%{name}
234 %defattr(644,root,root,755)
235 /lib/modules/%{_kernel_ver}smp/misc/*
This page took 0.07047 seconds and 4 git commands to generate.