/[smeserver]/rpms/slip-kmod/sme7/slip-kmod.spec
ViewVC logotype

Annotation of /rpms/slip-kmod/sme7/slip-kmod.spec

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


Revision 1.11 - (hide annotations) (download)
Tue May 13 20:20:04 2008 UTC (16 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: slip-kmod-1_0-2_2_6_9_67_0_15_EL
Changes since 1.10: +2 -2 lines
* Mon May  7 2007 Shad L. Lords <slords@mail.com>
- Update to use kmodtool

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

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