/[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.1 by jpp, Thu Feb 7 03:58:47 2019 UTC Revision 1.12 by jpp, Thu Mar 7 03:33:41 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 4  %define release 11
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 13  Source: %{name_src}-%{version}.tar.xz Line 23  Source: %{name_src}-%{version}.tar.xz
23  #Source: xtables-addons-%{version}.tar.xz  #Source: xtables-addons-%{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    Patch1: xtables-addons-1.47.1-10749-maxcountries.patch
27  Packager: Michel Begue <mab974@gmail.com>  Packager: Michel Begue <mab974@gmail.com>
 BuildRoot: %RPM_BUILD_ROOT  
28  #Requires: smeserver-release >= 9.0  #Requires: smeserver-release >= 9.0
29  Requires: xtables-addons >= 1.47.1-4  Requires: xtables-addons >= 1.47.1-4
30  #Requires: kernel = 2.6.32-696  #Requires: kernel = 2.6.32-696
31  Requires: kernel = 2.6.32-696.28.1.el6  #Requires: kernel = 2.6.32-696.28.1.el6
32  BuildRequires: e-smith-devtools  BuildRequires: e-smith-devtools
33  AutoReqProv: no  BuildRequires: iptables-devel
34    BuildRequires:  %{_bindir}/kmodtool
35    ExclusiveArch:  x86_64
36    Requires(post):   /sbin/weak-modules
37    Requires(postun): /sbin/weak-modules
38    
39    %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
40    
41    # kmodtool does its magic here
42    %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
43    
44    
45  %description  %description
46  %{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).
47  It is just a "kernel update" release.  It is just a "kernel update" release.
48    
49  %changelog  %changelog
50    * Wed Mar 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-11.sme
51    - set XT_GEOIP_MAX from 15 to 50 [SME: 10749]
52    
53    * Tue Feb 19 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-10.sme
54    - add weak-modules as post and postun [SME: 10739]
55    
56    * Sun Feb 17 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-9.sme
57    - fix Requires: xtables-addons-kmod-common [SME: 10734]
58    - revert change from -8 for -9
59    
60    * Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-7.sme
61    - first import to SME buildsys [SME: 10734]
62    - add buildrequires iptables-devel
63    - update spec files according to rpmfusion way,
64      add buildsys-build-rpmfusion-kerneldevpkgs requirement from rpmfusion
65    - workaround for install dir lib while script send it to usr/lib
66    - set current
67    - set archs x86_6, as no i386 buildsys-build-rpmfusion-kerneldevpkgs available to build
68    - TODO: try to build i386 using i686 buildsys-build-rpmfusion-kerneldevpkgs
69    
70  * Thu Mar 15 2018 Mab974 <mab974@gmail.com>  * Thu Mar 15 2018 Mab974 <mab974@gmail.com>
71  - 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
72    
# Line 39  It is just a "kernel update" release. Line 79  It is just a "kernel update" release.
79  - patch disable WITH_IPV6 in extra/*c  (-v6)  - patch disable WITH_IPV6 in extra/*c  (-v6)
80    
81  %prep  %prep
82    # error out if there was something wrong with kmodtool
83  %setup -n %{name_src}-%{version}  %{?kmodtool_check}
84  %patch0 -p1  # print kmodtool output for debugging purposes:
85    kmodtool  --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
86  ./configure --prefix=/usr  
87    %setup -q -c -T -a 0
88    %patch0
89    %patch1
90    
91    for kernel_version in %{?kernel_versions} ; do
92            cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}
93    done
94    
95  %build  %build
96  %{__make}  #ls -l  /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2
97    for kernel_version  in %{?kernel_versions} ; do
98            if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
99                    sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig
100            fi
101            if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
102                    sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig
103            fi
104            export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
105            make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules
106    done
107    
108  %install  %install
109  %{__rm} -rf %{buildroot}  for kernel_version  in %{?kernel_versions} ; do
110  %{__make} install DESTDIR="%{buildroot}"          export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
111  %{__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}
112  %{__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...
113            mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
114    done
115    %{?akmod_install}
116    
117  %clean  %clean
118  %{__rm} -rf %{buildroot}  %{__rm} -rf %{buildroot}
119    
120  %pre  %pre
121    
122  %post  %post -n %{name}
123    /sbin/weak-modules  --add-kernel
124    
125  %preun  %preun
126    
127  %postun  %postun -n %{name}
128    /sbin/weak-modules  --add-kernel
129    
130  %files  %files
131  %defattr(-, root, root, 0755)  %defattr(-, root, root, 0755)


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