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

Diff of /rpms/ppp-kmod/sme7/ppp-kmod.spec

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

Revision 1.21 by snetram, Mon Apr 20 20:12:32 2009 UTC Revision 1.23 by slords, Tue May 26 17:12:09 2009 UTC
# Line 1  Line 1 
1  # $Id: ppp-kmod.spec,v 1.20 2009/04/13 14:43:10 snetram Exp $  # $Id: ppp-kmod.spec,v 1.22 2009/05/02 10:09:04 bytegw Exp $
2    
3    # Define the kmod package name here.
4    %define  kmod_name ppp
5    
 Source10: kmodtool2  
 %define kmodtool bash %{SOURCE10}  
 %{!?kversion: %define kversion 2.6.9-78.0.17.EL}  
6  # hint: this can he overridden with "--define kversion foo" on the rpmbuild command line, e.g.  # 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"  # --define "kversion 2.6.16-1.2096_FC5"
8    %{!?kversion: %define kversion 2.6.9-78.0.22.EL}
9    
10  %define kmod_name ppp  Name:    %{kmod_name}-kmod
11  %define kverrel %(%{kmodtool} verrel %{?kversion} 2>/dev/null)  Version: 1.0.2
12    Release: 4%{?dist}
13    Group:   System Environment/Kernel
14    License: GPL
15    Summary: %{kmod_name} kernel modules
16    
17    BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18    ExclusiveArch: i586 i686 x86_64
19    
20    # Sources.
21    Source0:  kernel_ppp_mppe-%{version}-src.tgz
22    Source10: kmodtool-%{kmod_name}
23    
24    # Define the variants for each architecture.
25  %define upvar ""  %define upvar ""
26  %ifarch i586 i686 x86_64  %define smpvar  smp
 %define smpvar smp  
 %endif  
27  %ifarch i686  %ifarch i686
28  %define hugememvar hugemem  %define hugememvar hugemem
29  %define xenvar xenU  %define xenvar xenU
# Line 21  Source10: kmodtool2 Line 32  Source10: kmodtool2
32  %define largesmpvar largesmp  %define largesmpvar largesmp
33  %define xenvar xenU  %define xenvar xenU
34  %endif  %endif
35  %{!?kvariants: %define kvariants %{?upvar} %{?smpvar} %{?hugememvar} %{?largesmpvar} %{?xenvar}}  
36  # hint: this can he overridden with "--define kvariant foo bar" on the rpmbuild command line, e.g.  # If kvariants isn't defined on the rpmbuild line, build all variants for this architecture.
37  # --define 'kvariant "" smp'  %{!?kvariants: %define kvariants %{?upvar} %{?smpvar}  %{?xenvar} %{?hugememvar} %{?largesmpvar}}
38    
39  Name:           %{kmod_name}-kmod  # Magic hidden here.
40  Version:        1.0.2  %define kmodtool sh %{SOURCE10}
41  Release:        3.%(echo %{kverrel} | tr - _)  %{expand:%(%{kmodtool} rpmtemplate_kmp %{kmod_name} %{kversion} %{kvariants} 2>/dev/null)}
 Summary:        %{kmod_name} kernel modules  
   
 Group:          System Environment/Kernel  
 License:        GPL  
 Source0:        kernel_ppp_mppe-%{version}-src.tgz  
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  
 ExclusiveArch:  i586 i686 x86_64  
42    
43  %description  %description
44  %{summary}.  %{summary}.
45    
 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}  
   
46  %prep  %prep
47  %setup -q -c  %setup -q -c
48  cd kernel_ppp_mppe-%{version}  pushd kernel_ppp_mppe-%{version}
49  ./pre_build.sh %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu} . . %{kverrel}  ./pre_build.sh lib/modules/"%{kversion}${kvariant:+$kvariant}"/build . . %{kversion}${kvariant:+$kvariant}
50  patch -p1 < patches/linux-2.6.2-pad.patch  patch -p1 < patches/linux-2.6.2-pad.patch
51  patch -p1 < patches/02-ppp_generic.c.patch  patch -p1 < patches/02-ppp_generic.c.patch
52  patch -p1 < patches/03-ppp_mppe_compress.c.patch  patch -p1 < patches/03-ppp_mppe_compress.c.patch
53  patch -p1 < patches/04-ppp_mppe_compress.c_license.patch  patch -p1 < patches/04-ppp_mppe_compress.c_license.patch
54  cd ..  popd
55  for kvariant in %{kvariants} ; do  for kvariant in %{kvariants} ; do
56      cp -a kernel_ppp_mppe-%{version} _kmod_build_$kvariant      cp -a kernel_ppp_mppe-%{version} _kmod_build_$kvariant
57  done  done
58    
59  %build  %build
 rm -rf $RPM_BUILD_ROOT  
60  for kvariant in %{kvariants} ; do  for kvariant in %{kvariants} ; do
61      ks=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}  #    ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu}
62      make -C $ks SUBDIRS=${PWD}/_kmod_build_$kvariant modules  #    pushd _kmod_build_$kvariant
63      make -C $ks SUBDIRS=${PWD}/_kmod_build_$kvariant modules_install \  #    make -C "${ksrc}" modules M=$PWD
64          INSTALL_MOD_PATH=$RPM_BUILD_ROOT modinst_dir='$(MODLIB)/updates/'%{kmod_name}  #    popd
65        ksrc=/lib/modules/"%{kversion}${kvariant:+$kvariant}"/build
66        cd _kmod_build_$kvariant
67        # make TOPDIR=${ksrc} modules %{?_smp_mflags}
68        make -C "${ksrc}" SUBDIRS=${PWD} modules %{?_smp_mflags}
69        cd ..
70  done  done
71  chmod +x $RPM_BUILD_ROOT/lib/modules/*/updates/%{kmod_name}/*.ko  
72    %install
73    export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
74    export INSTALL_MOD_DIR=extra/%{kmod_name}
75    for kvariant in %{kvariants} ; do
76    #    ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu}
77    #    pushd _kmod_build_$kvariant
78    #    make -C "${ksrc}" modules_install M=$PWD
79    #    install -d ${INSTALL_MOD_PATH}/usr/lib/debug
80    #    popd
81        ksrc=/lib/modules/"%{kversion}${kvariant:+$kvariant}"/build
82        cd _kmod_build_$kvariant
83        make -C ${ksrc} SUBDIRS=`pwd` INSTALL_MOD_PATH=$RPM_BUILD_ROOT modinst_dir='$(MODLIB)/extra/'%{kmod_name} modules_install
84        # make TOPDIR=${ksrc} INSTALL_MOD_PATH=$RPM_BUILD_ROOT INSTALL_MOD_DIR=extra/%{kmod_name}/ modules_install %{?_smp_mflags}
85        cd ..
86    done
87    
88    # Strip the module(s).
89    find ${INSTALL_MOD_PATH} -type f -name \*.ko -exec strip --strip-debug \{\} \;
90    #
91    
92  %clean  %clean
93  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
94    
95  %changelog  %changelog
96    * Tue May 26 2009 Shad L. Lords <slords@mail.com> 1.0.4-4.sme
97    - Initial build of the kABI-tracking version from 1.0.4.
98    - Modified spec and kmodtool(-ppp)
99    - Note: weak-modules became available as of CentOS-4.7
100    - Strip the module(s) added
101    
102  * Thu Feb  5 2009 Shad L. Lords <slords@mail.com>  * Thu Feb  5 2009 Shad L. Lords <slords@mail.com>
103  - Fix post scripts [SME: 4864]  - Fix post scripts [SME: 4864]
104    
# Line 76  rm -rf $RPM_BUILD_ROOT Line 107  rm -rf $RPM_BUILD_ROOT
107    
108  * Fri Dec 01 2006 Shad L. Lords <slords@mail.com>  * Fri Dec 01 2006 Shad L. Lords <slords@mail.com>
109  - Initial package.  - Initial package.
   


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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