/[smecontribs]/rpms/bmcsensors-kmod/contribs7/bmcsensors-kmod.spec
ViewVC logotype

Contents of /rpms/bmcsensors-kmod/contribs7/bmcsensors-kmod.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Mar 3 15:24:18 2009 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: bmcsensors-kmod-1_0-20050320_2_6_9_78_0_13_EL, HEAD
Initial import of bmcsensors-kmod

1 # $Id: bmcsenseors.spec,v 1.2 2009/03/02 23:53:29 slords Exp $
2 # Authority: vip-ire
3 # Name: Daniel Berteaud
4
5 Source10: kmodtool2
6 %define kmodtool bash %{SOURCE10}
7 %{!?kversion: %define kversion 2.6.9-78.0.13.EL}
8 # hint: this can he overridden with "--define kversion foo" on the rpmbuild command line, e.g.
9 # --define "kversion 2.6.16-1.2096_FC5"
10
11 %define kmod_name bmcsensors
12 %define kverrel %(%{kmodtool} verrel %{?kversion} 2>/dev/null)
13
14 %define upvar ""
15 %ifarch i586 i686 x86_64
16 %define smpvar smp
17 %endif
18 %ifarch i686
19 %define hugememvar hugemem
20 %define xenvar xenU
21 %endif
22 %ifarch x86_64
23 %define largesmpvar largesmp
24 %define xenvar xenU
25 %endif
26 %{!?kvariants: %define kvariants %{?upvar} %{?smpvar} %{?hugememvar} %{?largesmpvar} %{?xenvar}}
27 # hint: this can he overridden with "--define kvariant foo bar" on the rpmbuild command line, e.g.
28 # --define 'kvariant "" smp'
29
30 Name: %{kmod_name}-kmod
31 Version: 1.0
32 Release: 20050320.%(echo %{kverrel} | tr - _)
33 Summary: %{kmod_name} kernel modules
34
35 Group: System Environment/Kernel
36 License: GPL
37 Source0: %{kmod_name}-%{version}-src.tgz
38 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
39 ExclusiveArch: i586 i686 x86_64
40
41 %description
42 bmcsensors, a IPMI compatible driver for lm_sensors
43 %{summary}.
44
45 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
46
47 %prep
48 %setup -q -c
49 echo 'obj-m += i2c-ipmi.o bmcsensors.o' > %{kmod_name}/Makefile
50 for kvariant in %{kvariants} ; do
51 cp -a %{kmod_name} _kmod_build_$kvariant
52 done
53
54 %build
55 rm -rf $RPM_BUILD_ROOT
56 for kvariant in %{kvariants} ; do
57 ks=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
58 make -C $ks SUBDIRS=${PWD}/_kmod_build_$kvariant modules
59 make -C $ks SUBDIRS=${PWD}/_kmod_build_$kvariant modules_install \
60 INSTALL_MOD_PATH=$RPM_BUILD_ROOT modinst_dir='$(MODLIB)/updates/'%{kmod_name}
61 done
62 chmod +x $RPM_BUILD_ROOT/lib/modules/*/updates/%{kmod_name}/*.ko
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %changelog
68 * Tue Mar 3 2009 Shad L. Lords <slords@mail.com>
69 - Initial package.
70

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed