/[smecontribs]/rpms/xtables-addons-kmod/contribs9/xtables-addons-kmod.spec
ViewVC logotype

Diff of /rpms/xtables-addons-kmod/contribs9/xtables-addons-kmod.spec

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

Revision 1.2 by jpp, Thu Feb 7 05:05:46 2019 UTC Revision 1.6 by jpp, Sun Feb 17 08:01:09 2019 UTC
# Line 1  Line 1 
1    # buildforkernels macro hint: when you build a new version or a new release
2    # that contains bugfixes or other improvements then you must disable the
3    # "buildforkernels newest" macro for just that build; immediately after
4    # queuing that build enable the macro again for subsequent builds; that way
5    # a new akmod package will only get build when a new one is actually needed
6    %global buildforkernels current
7    
8    #FIXME xtables-kmod doesn't use the appropriate cflags
9    %global debug_package %{nil}
10    
11  %define name xtables-addons-kmod  %define name xtables-addons-kmod
12  %define name_src xtables-addons  %define name_src xtables-addons
13  %define version 1.47.1  %define version 1.47.1
14  %define release 5  %define release 6
15  Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY).  Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY).
16  Name: %{name}  Name: %{name}
17  Version: %{version}  Version: %{version}
# Line 14  Source: %{name_src}-%{version}.tar.xz Line 24  Source: %{name_src}-%{version}.tar.xz
24  URL: http://xtables-addons.sourceforge.net  URL: http://xtables-addons.sourceforge.net
25  Patch0: xtables-addons-1.47.1-v6.patch  Patch0: xtables-addons-1.47.1-v6.patch
26  Packager: Michel Begue <mab974@gmail.com>  Packager: Michel Begue <mab974@gmail.com>
 BuildRoot: %RPM_BUILD_ROOT  
27  #Requires: smeserver-release >= 9.0  #Requires: smeserver-release >= 9.0
28  Requires: xtables-addons >= 1.47.1-4  Requires: xtables-addons >= 1.47.1-4
29  #Requires: kernel = 2.6.32-696  #Requires: kernel = 2.6.32-696
30  Requires: kernel = 2.6.32-696.28.1.el6  #Requires: kernel = 2.6.32-696.28.1.el6
31  BuildRequires: e-smith-devtools  BuildRequires: e-smith-devtools
32  BuildRequires: iptables-devel  BuildRequires: iptables-devel
33  BuildRequires:  %{_bindir}/kmodtool  BuildRequires:  %{_bindir}/kmodtool
34  AutoReqProv: no  ExclusiveArch: i686 x86_6
35    
36    %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
37    
38    # kmodtool does its magic here
39    %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
40    
41    
42  %description  %description
43  %{name}  is a set of additional extensions for the Xtables packet filter that is present in the Linux kernel (modules kmod ONLY).  %{name}  is a set of additional extensions for the Xtables packet filter that is present in the Linux kernel (modules kmod ONLY).
44  It is just a "kernel update" release.  It is just a "kernel update" release.
45    
46  %changelog  %changelog
47  * Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-5.sme  * Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-6.sme
48  - first import to SME buildsys [SME: 10734]  - first import to SME buildsys [SME: 10734]
49  - add buildrequires iptables-devel  - add buildrequires iptables-devel
50    - update spec files according to rpmfusion way,
51      add buildsys-build-rpmfusion-kerneldevpkgs requirement from rpmfusion
52    - workaround for install dir lib while script send it to usr/lib
53    - set current
54    - set archs i686 x86_6, as no i386 buildsys-build-rpmfusion-kerneldevpkgs available to build
55    
56  * Thu Mar 15 2018 Mab974 <mab974@gmail.com>  * Thu Mar 15 2018 Mab974 <mab974@gmail.com>
57  - compiled for kernel version 2.6.32-696.23.1.el6.x86_64  - compiled for kernel version 2.6.32-696.23.1.el6.x86_64
# Line 45  It is just a "kernel update" release. Line 65  It is just a "kernel update" release.
65  - patch disable WITH_IPV6 in extra/*c  (-v6)  - patch disable WITH_IPV6 in extra/*c  (-v6)
66    
67  %prep  %prep
   
 #%setup -n %{name_src}-%{version}  
 #%patch0 -p1  
   
 #./configure --prefix=/usr --with-kbuild=  
   
68  # error out if there was something wrong with kmodtool  # error out if there was something wrong with kmodtool
69  %{?kmodtool_check}  %{?kmodtool_check}
70  # print kmodtool output for debugging purposes:  # print kmodtool output for debugging purposes:
71  kmodtool  --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null  kmodtool  --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
72    
73  %setup -q -c -T -a 0  %setup -q -c -T -a 0
74  %patch0 -p1  %patch0
75  for kernel_version in %{?kernel_versions} ; do  for kernel_version in %{?kernel_versions} ; do
76          cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}          cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}
77  done  done
78    
   
79  %build  %build
80    #ls -l  /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2
81  for kernel_version  in %{?kernel_versions} ; do  for kernel_version  in %{?kernel_versions} ; do
82            if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
83                    sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig
84            fi
85            if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
86                    sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig
87            fi
88          export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}          export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
89          make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules          make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules
90  done  done
91    
   
 #%build  
 #%{__make}  
   
92  %install  %install
93  %{__rm} -rf %{buildroot}  for kernel_version  in %{?kernel_versions} ; do
94  %{__make} install DESTDIR="%{buildroot}"          export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
95  %{__rm} -rf %{buildroot}/lib64/          make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions _emodinst_ INSTALL_MOD_PATH=%{buildroot}%{_prefix} ext-mod-dir=%{kmodinstdir_postfix}
96  %{__rm} -rf %{buildroot}/usr/          # workaround to avoid error at file stage, it seems that we are installing it in /usr/lib and files script is waiting it in /lib...
97            mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
98    done
99    %{?akmod_install}
100    
101  %clean  %clean
102  %{__rm} -rf %{buildroot}  %{__rm} -rf %{buildroot}


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