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

Annotation 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.4 - (hide annotations) (download)
Thu Aug 27 15:32:59 2020 UTC (4 years, 3 months ago) by michel
Branch: MAIN
CVS Tags: xtables-addons-kmod-2_14-03_el7_sme
Changes since 1.3: +2 -2 lines
akmod build

1 michel 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    
7 michel 1.4 %global buildforkernels akmod
8 michel 1.1
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 michel 1.4 %define release 03
16 michel 1.1 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 michel 1.2 * Tue Jul 21 2020 Michel Begue <mab974@gmail.com> 2.14-02.sme
48     - change in install workaround. copy /usr/lib to /lib
49    
50 michel 1.1 * 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 michel 1.2
63 michel 1.1 # print kmodtool output for debugging purposes:
64     kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
65    
66     %setup -q -c -T -a 0
67     %patch0
68    
69     for kernel_version in %{?kernel_versions} ; do
70     cp -a xtables-addons-%{version} _kmod_build_${kernel_version%%___*}
71     done
72    
73     %build
74     for kernel_version in %{?kernel_versions} ; do
75     export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
76     make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules
77     done
78    
79     %install
80 michel 1.2 %{__rm} -rf %{buildroot}
81    
82 michel 1.1 for kernel_version in %{?kernel_versions} ; do
83     export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*}
84     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}
85     # 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...
86 michel 1.2 #mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
87     cp -R %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib
88 michel 1.1 done
89     %{?akmod_install}
90    
91     %clean
92     %{__rm} -rf %{buildroot}
93    
94     %pre
95    
96     %post -n %{name}
97     /sbin/weak-modules --add-kernel
98    
99     %preun
100    
101     %postun -n %{name}
102     /sbin/weak-modules --add-kernel
103    
104     %files
105     %defattr(-, root, root, 0755)
106     /lib/modules/*
107    

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