/[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.6 - (show annotations) (download)
Sat Aug 29 19:28:24 2020 UTC (4 years, 3 months ago) by michel
Branch: MAIN
CVS Tags: xtables-addons-kmod-2_14-05_el7_sme, HEAD
Changes since 1.5: +6 -3 lines
Error occurred while calculating annotation data.
-newest- build

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
9 #FIXME xtables-kmod doesn't use the appropriate cflags
10 %global debug_package %{nil}
11
12 %define name xtables-addons-kmod
13 %define name_src xtables-addons
14 %define version 2.14
15 %define release 05
16 Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY).
17 Name: %{name}
18 Version: %{version}
19 Release: %{release}%{?dist}
20 Distribution: SME Server
21 License: GNU GPL version 2
22 Group: SME Server/addon
23 Source: %{name_src}-%{version}.tar.xz
24 URL: http://xtables-addons.sourceforge.net
25 Patch0: %{name_src}-2.14-init.patch
26 Packager: Michel Begue <mab974@gmail.com>
27
28 Requires: smeserver-release >= 10.0
29 Requires: xtables-addons >= 2.14
30 BuildRequires: e-smith-devtools
31 BuildRequires: iptables-devel
32 BuildRequires: %{_bindir}/kmodtool
33 ExclusiveArch: x86_64
34 Requires(post): /sbin/weak-modules
35 Requires(postun): /sbin/weak-modules
36
37 %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
38
39 # kmodtool does its magic here
40 %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
41
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 * Sat Aug 29 2020 Michel Begue <mab974@gmail.com> 2.14-05.sme
48 - kmodtool build for sme10
49
50 * Tue Jul 21 2020 Michel Begue <mab974@gmail.com> 2.14-02.sme
51 - change in install workaround. copy /usr/lib to /lib
52
53 * Wed Apr 15 2020 Michel Begue <mab974@gmail.com> 2.14-01.sme
54 - initial release 2.14 for sme10
55 - changes for using GeoIP2 databases (download and build (-g2) + fetch)
56 - dependency : perl-IO-Socket-INET6 (bug sa-update)
57 - set XT_GEOIP_MAX from 15 to 50
58 - comment out "print STDERR" counters in xt_geoip-build
59 - add license_key in download script of bases
60 - comment out build_TARPIT (Centos 7 compatibility pbm)
61
62 %prep
63 # error out if there was something wrong with kmodtool
64 %{?kmodtool_check}
65
66 # print kmodtool output for debugging purposes:
67 kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
68
69 %setup -q -c -T -a 0
70 %patch0
71
72 for kernel_version in %{?kernel_versions} ; do
73 cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}
74 done
75
76 %build
77 for kernel_version in %{?kernel_versions} ; do
78 export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
79 make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules
80 done
81
82 %install
83 %{__rm} -rf %{buildroot}
84
85 for kernel_version in %{?kernel_versions} ; do
86 export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
87 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}
88 # 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...
89 #mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
90 cp -R %{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