]> git.pld-linux.org Git - packages/lm_sensors.git/blob - lm_sensors.spec
- small test
[packages/lm_sensors.git] / lm_sensors.spec
1
2 # conditional build
3 # _without_dist_kernel          without kernel for distributions
4
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 6
8
9 Summary:        Hardware health monitoring
10 Summary(pl):    Monitor stanu sprzêtu
11 Name:           lm_sensors
12 Version:        2.6.2
13 Release:        %{_rel}
14 License:        GPL
15 Group:          Applications/System
16 Group(de):      Applikationen/System
17 Group(pl):      Aplikacje/System
18 Source0:        http://www.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
19 Source1:        sensors.init
20 Source2:        sensors.sysconfig
21 Patch0:         %{name}-make.patch
22 URL:            http://www.netroedge.com/~lm78/
23 BuildRequires:  flex >= 2.5.1
24 BuildRequires:  bison
25 #BuildRequires:  i2c-devel >= 2.6.0
26 PreReq:         /sbin/chkconfig
27 PreReq:         /sbin/ldconfig
28 Requires:       %{name}-modules = %{version}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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 %package devel
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}
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 %package static
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}
70
71 %description static
72 Static libraries for lm_sensors.
73
74 %description static -l pl
75 Biblioteki statyczne dla lm_sensors.
76
77 %package -n kernel-misc-%{name}
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:        %{_rel}@%{_kernel_ver_str}
84 Prereq:         /sbin/depmod
85 Requires:       i2c >= 2.6.0
86 %{?!_without_dist_kernel:Conflicts:     kernel < %{_kernel_ver}, kernel > %{_kernel_ver}}
87 %{?!_without_dist_kernel:Conflicts:     kernel-smp}
88 Obsoletes:      %{name}-modules
89 Obsoletes:      kernel-smp-misc-%{name}
90 Provides:       %{name}-modules = %{version}
91
92 %description -n kernel-misc-%{name}
93 Kernel modules for various buses and monitor chips.
94
95 %description -n kernel-misc-%{name} -l pl
96 Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
97
98
99 %package -n kernel-smp-misc-%{name}
100 Summary:        Kernel modules for various buses and monitor chips
101 Summary(pl):    Modu³y j±dra dla ró¿nego rodzaju sensorów
102 Group:          Applications/System
103 Group(de):      Applikationen/System
104 Group(pl):      Aplikacje/System
105 Release:        %{_rel}@%{_kernel_ver_str}
106 Prereq:         /sbin/depmod
107 Requires:       i2c >= 2.6.0
108 %{?!_without_dist_kernel:Conflicts:     kernel < %{_kernel_ver}, kernel > %{_kernel_ver}}
109 %{?!_without_dist_kernel:Conflicts:     kernel-up}
110 Obsoletes:      %{name}-modules
111 Obsoletes:      kernel-misc-%{name}
112 Provides:       %{name}-modules = %{version}
113
114 %description -n kernel-smp-misc-%{name}
115 Kernel SMP modules for various buses and monitor chips.
116
117 %description -n kernel-smp-misc-%{name} -l pl
118 Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
119
120
121
122 %prep
123 %setup -q
124 %patch0 -p1
125
126 %build
127
128 #up
129 %{__make} \
130         OPTS="%{rpmcflags}" \
131         LINUX=/dev/null \
132         LINUX_HEADERS=%{_kernelsrcdir}/include \
133         I2C_HEADERS=%{_kernelsrcdir}/include \
134         SMP=0
135
136 %{__make} install-kernel \
137         MODDIR=kernel-up-modules
138 %{__make} install-kernel-busses \
139         MODDIR=kernel-up-modules
140 %{__make} install-kernel-chips \
141         MODDIR=kernel-up-modules
142
143 %{__make} clean
144
145 #smp
146 %{__make} \
147         OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
148         LINUX=/dev/null \
149         LINUX_HEADERS=%{_kernelsrcdir}/include \
150         I2C_HEADERS=%{_kernelsrcdir}/include \
151         SMP=1
152                                         
153 %install
154 rm -rf $RPM_BUILD_ROOT
155
156 %{__make} install \
157         DESTDIR=$RPM_BUILD_ROOT \
158         PREFIX=%{_prefix} \
159         ETCDIR=%{_sysconfdir} \
160         MANDIR=%{_mandir} \
161         MODDIR=/lib/modules/%{_kernel_ver}smp/misc
162
163 install -d $RPM_BUILD_ROOT%{_sbindir}
164 install -d $RPM_BUILD_ROOT%{_mandir}/man8
165 install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir}
166 install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8
167
168 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
169 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
170 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
171
172 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
173 install kernel-up-modules/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc 
174
175 gzip -9nf BACKGROUND BUGS CHANGES README README.thinkpad TODO
176 find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %post
182 /sbin/ldconfig
183 /sbin/chkconfig --add sensors
184 if [ -f /var/lock/subsys/sensors ]; then
185         /etc/rc.d/init.d/sensors restart >&2
186 else
187         echo "You have to configure sensors modules."
188         echo "Please edit /etc/sysconfig/sensors file according to your hardware."
189         echo
190         echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
191 fi
192
193 %preun
194 if [ "$1" = "0" ]; then
195         if [ -f /var/lock/subsys/sensors ]; then
196                 /etc/rc.d/init.d/sensors stop >&2
197         fi
198         /sbin/chkconfig --del sensors
199 fi
200
201 %postun -p /sbin/ldconfig
202
203 %post -n kernel-misc-%{name}
204 /sbin/depmod -a
205
206 %post -n kernel-smp-misc-%{name}
207 /sbin/depmod -a
208
209 %postun -n kernel-misc-%{name}
210 /sbin/depmod -a
211
212 %postun -n kernel-smp-misc-%{name}
213 /sbin/depmod -a
214
215
216 %files 
217 %defattr(644,root,root,755)
218 %doc *.gz 
219 %doc doc/*.gz doc/*.html doc/busses doc/chips
220 %attr(755,root,root) %{_bindir}/sensors
221 %attr(755,root,root) %{_sbindir}/sensors-detect
222 %attr(754,root,root) %{_sbindir}/sensord
223 %attr(754,root,root) /etc/rc.d/init.d/sensors
224 %attr(755,root,root) %{_libdir}/lib*.so.*.*
225 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf
226 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors
227 %{_mandir}/man1/*
228 %{_mandir}/man5/*
229 %{_mandir}/man8/*
230
231 %files devel
232 %defattr(644,root,root,755)
233 %doc doc/developers doc/kernel
234 %attr(755,root,root) %{_libdir}/lib*.so
235 %{_includedir}/sensors
236 %{_includedir}/linux/*
237 %{_mandir}/man3/*
238
239 %files static
240 %defattr(644,root,root,755)
241 %{_libdir}/libsensors.a
242
243 %files -n kernel-misc-%{name}
244 %defattr(644,root,root,755)
245 /lib/modules/%{_kernel_ver}/misc/*
246
247 %files -n kernel-smp-misc-%{name}
248 %defattr(644,root,root,755)
249 /lib/modules/%{_kernel_ver}smp/misc/*
This page took 0.192973 seconds and 4 git commands to generate.