1 |
jpp |
1.3 |
# 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 |
jpp |
1.1 |
%define name xtables-addons-kmod |
12 |
|
|
%define name_src xtables-addons |
13 |
|
|
%define version 1.47.1 |
14 |
jpp |
1.10 |
%define release 9 |
15 |
jpp |
1.1 |
Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY). |
16 |
|
|
Name: %{name} |
17 |
|
|
Version: %{version} |
18 |
|
|
Release: %{release}%{?dist} |
19 |
|
|
Distribution: SME Server |
20 |
|
|
License: GNU GPL version 2 |
21 |
|
|
Group: SME Server/addon |
22 |
|
|
Source: %{name_src}-%{version}.tar.xz |
23 |
|
|
#Source: xtables-addons-%{version}.tar.xz |
24 |
|
|
URL: http://xtables-addons.sourceforge.net |
25 |
|
|
Patch0: xtables-addons-1.47.1-v6.patch |
26 |
|
|
Packager: Michel Begue <mab974@gmail.com> |
27 |
|
|
#Requires: smeserver-release >= 9.0 |
28 |
|
|
Requires: xtables-addons >= 1.47.1-4 |
29 |
|
|
#Requires: kernel = 2.6.32-696 |
30 |
jpp |
1.3 |
#Requires: kernel = 2.6.32-696.28.1.el6 |
31 |
jpp |
1.1 |
BuildRequires: e-smith-devtools |
32 |
jpp |
1.2 |
BuildRequires: iptables-devel |
33 |
|
|
BuildRequires: %{_bindir}/kmodtool |
34 |
jpp |
1.7 |
ExclusiveArch: x86_64 |
35 |
jpp |
1.3 |
|
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 |
jpp |
1.1 |
|
42 |
|
|
%description |
43 |
|
|
%{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. |
45 |
|
|
|
46 |
|
|
%changelog |
47 |
jpp |
1.10 |
* Sun Feb 17 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-9.sme |
48 |
jpp |
1.8 |
- fix Requires: xtables-addons-kmod-common [SME: 10734] |
49 |
jpp |
1.10 |
- revert change from -8 for -9 |
50 |
jpp |
1.8 |
|
51 |
jpp |
1.7 |
* Wed Feb 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.47.1-7.sme |
52 |
jpp |
1.2 |
- first import to SME buildsys [SME: 10734] |
53 |
|
|
- add buildrequires iptables-devel |
54 |
jpp |
1.3 |
- update spec files according to rpmfusion way, |
55 |
|
|
add buildsys-build-rpmfusion-kerneldevpkgs requirement from rpmfusion |
56 |
|
|
- workaround for install dir lib while script send it to usr/lib |
57 |
|
|
- set current |
58 |
jpp |
1.7 |
- set archs x86_6, as no i386 buildsys-build-rpmfusion-kerneldevpkgs available to build |
59 |
|
|
- TODO: try to build i386 using i686 buildsys-build-rpmfusion-kerneldevpkgs |
60 |
jpp |
1.2 |
|
61 |
jpp |
1.1 |
* Thu Mar 15 2018 Mab974 <mab974@gmail.com> |
62 |
|
|
- compiled for kernel version 2.6.32-696.23.1.el6.x86_64 |
63 |
|
|
|
64 |
|
|
* Sat Oct 07 2017 Mab974 <mab974@gmail.com> |
65 |
|
|
- compiled for kernel version 2.6.32-696.13.2.el6.x86_64 |
66 |
|
|
|
67 |
|
|
* Thu Sep 28 2017 Mab974 <mab974@gmail.com> |
68 |
|
|
- compiled for kernel version 2.6.32-696.10.3.el6.x86_64 |
69 |
|
|
- extensions (kmod) files ONLY. |
70 |
|
|
- patch disable WITH_IPV6 in extra/*c (-v6) |
71 |
|
|
|
72 |
|
|
%prep |
73 |
jpp |
1.2 |
# error out if there was something wrong with kmodtool |
74 |
|
|
%{?kmodtool_check} |
75 |
|
|
# print kmodtool output for debugging purposes: |
76 |
|
|
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null |
77 |
|
|
|
78 |
|
|
%setup -q -c -T -a 0 |
79 |
jpp |
1.3 |
%patch0 |
80 |
jpp |
1.2 |
for kernel_version in %{?kernel_versions} ; do |
81 |
|
|
cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*} |
82 |
|
|
done |
83 |
jpp |
1.1 |
|
84 |
|
|
%build |
85 |
jpp |
1.3 |
#ls -l /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2 |
86 |
jpp |
1.2 |
for kernel_version in %{?kernel_versions} ; do |
87 |
jpp |
1.3 |
if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then |
88 |
|
|
sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig |
89 |
|
|
fi |
90 |
|
|
if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then |
91 |
|
|
sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig |
92 |
|
|
fi |
93 |
jpp |
1.2 |
export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} |
94 |
|
|
make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules |
95 |
|
|
done |
96 |
|
|
|
97 |
jpp |
1.1 |
%install |
98 |
jpp |
1.3 |
for kernel_version in %{?kernel_versions} ; do |
99 |
|
|
export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} |
100 |
|
|
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} |
101 |
|
|
# 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... |
102 |
|
|
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib |
103 |
|
|
done |
104 |
|
|
%{?akmod_install} |
105 |
jpp |
1.1 |
|
106 |
|
|
%clean |
107 |
|
|
%{__rm} -rf %{buildroot} |
108 |
|
|
|
109 |
|
|
%pre |
110 |
|
|
|
111 |
|
|
%post |
112 |
|
|
|
113 |
|
|
%preun |
114 |
|
|
|
115 |
|
|
%postun |
116 |
|
|
|
117 |
|
|
%files |
118 |
|
|
%defattr(-, root, root, 0755) |
119 |
|
|
/lib/modules/* |