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

Contents of /rpms/xtables-addons-kmod/contribs10/xtables-addons-kmod.spec

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


Revision 1.1 - (show annotations) (download)
Thu Jun 25 16:44:52 2020 UTC (4 years, 5 months ago) by michel
Branch: MAIN
CVS Tags: xtables-addons-kmod-2_14-01_el7_sme
make: « clog » est à jour.

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
7 %global buildforkernels newest
8 #%global buildforkernels current
9 #%global buildforkernels akmod
10
11 #FIXME xtables-kmod doesn't use the appropriate cflags
12 %global debug_package %{nil}
13
14 %define name xtables-addons-kmod
15 %define name_src xtables-addons
16 %define version 2.14
17 %define release 01
18 Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY).
19 Name: %{name}
20 Version: %{version}
21 Release: %{release}%{?dist}
22 Distribution: SME Server
23 License: GNU GPL version 2
24 Group: SME Server/addon
25 Source: %{name_src}-%{version}.tar.xz
26 URL: http://xtables-addons.sourceforge.net
27 Patch0: %{name_src}-2.14-init.patch
28 Packager: Michel Begue <mab974@gmail.com>
29 #BuildRoot: %RPM_BUILD_ROOT
30
31 Requires: smeserver-release >= 10.0
32 Requires: xtables-addons >= 2.14
33 BuildRequires: e-smith-devtools
34 BuildRequires: iptables-devel
35 BuildRequires: %{_bindir}/kmodtool
36 ExclusiveArch: x86_64
37 Requires(post): /sbin/weak-modules
38 Requires(postun): /sbin/weak-modules
39
40 %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
41
42 # kmodtool does its magic here
43 %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
44
45 %description
46 %{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.
48
49 %changelog
50 * Wed Apr 15 2020 Michel Begue <mab974@gmail.com> 2.14-01.sme
51 - initial release 2.14 for sme10
52 - changes for using GeoIP2 databases (download and build (-g2) + fetch)
53 - dependency : perl-IO-Socket-INET6 (bug sa-update)
54 - set XT_GEOIP_MAX from 15 to 50
55 - comment out "print STDERR" counters in xt_geoip-build
56 - add license_key in download script of bases
57 - comment out build_TARPIT (Centos 7 compatibility pbm)
58
59 %prep
60 # error out if there was something wrong with kmodtool
61 %{?kmodtool_check}
62 # print kmodtool output for debugging purposes:
63 kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
64
65 %setup -q -c -T -a 0
66 %patch0
67
68 for kernel_version in %{?kernel_versions} ; do
69 cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}
70 done
71
72 %build
73 #ls -l /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2
74 for kernel_version in %{?kernel_versions} ; do
75 if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
76 sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig
77 fi
78 if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then
79 sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig
80 fi
81 export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
82 make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules
83 done
84
85 %install
86 for kernel_version in %{?kernel_versions} ; do
87 export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
88 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}
89 # 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...
90 mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
91 done
92 %{?akmod_install}
93
94 %clean
95 %{__rm} -rf %{buildroot}
96
97 %pre
98
99 %post -n %{name}
100 /sbin/weak-modules --add-kernel
101
102 %preun
103
104 %postun -n %{name}
105 /sbin/weak-modules --add-kernel
106
107 %files
108 %defattr(-, root, root, 0755)
109 /lib/modules/*
110

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