source: projects/specs/trunk/x/xtables-addons/xtables-addons-vl.spec @ 11534

Revision 11534, 7.2 KB checked in by tomop, 6 years ago (diff)

xtables-addons-2.14-2

Line 
1Name:           xtables-addons
2Summary:        Extensions targets and matches for iptables
3Version:        2.14
4Release:        2%{?_dist_release}
5# The entire source code is GPLv2 except ACCOUNT/libxt_ACCOUNT_cl.* which is LGPLv2
6License:        GPLv2 and LGPLv2
7Group:          System Environment/Base
8URL:            http://xtables-addons.sourceforge.net
9Source0:        http://dl.sourceforge.net/xtables-addons/Xtables-addons/%{version}/xtables-addons-%{version}.tar.xz
10BuildRequires:  iptables-devel >= 1.4.5
11BuildRequires:  autoconf automake libtool
12Provides:       %{name}-kmod-common = %{version}
13Requires(post): chkconfig
14Requires(preun): chkconfig
15# This is for /sbin/service
16Requires(preun): initscripts
17Requires(postun): initscripts
18Requires:       ipset >= 6.11
19Obsoletes:      %{name}-devel < 1.27-1
20
21%description
22Xtables-addons provides extra modules for iptables not present in the kernel,
23and is the successor of patch-o-matic. Extensions includes new targets like
24TEE, TARPIT, CHAOS, or modules like geoip, ipset, and account.
25
26This package provides the userspace libraries for iptables to use extensions
27in the %{name}-kmod package. You must also install the
28%{name}-kmod package.
29
30%package -n dkms-%{name}
31Summary:        dkms package for xtables-addons
32Group:          System Environment/Kernel
33Requires:       dkms
34Requires:       kernel >= 4.14.0
35Requires:       kernel-devel >= 4.14.0
36Requires(post): dkms
37Requires(preun):dkms
38
39%description -n dkms-%{name}
40This contains the dkms package building the xtables-addons kernel modules.
41
42%prep
43%setup -q -n %{name}-%{version}
44./autogen.sh
45if [ ! -e /%{_lib}/xtables/libxt_CHECKSUM.so ]; then
46        sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' mconfig
47fi
48if [ ! -e /%{_lib}/xtables/libxt_TEE.so ]; then
49        sed -i 's/build_TEE=/build_TEE=m/' mconfig
50fi
51sed -i 's/build_ipset6=/build_ipset6=m/' mconfig
52
53%build
54%configure --without-kbuild
55
56make V=1 %{?_smp_mflags}
57
58%install
59make DESTDIR=%{buildroot} install
60
61# We add xt_geoip database scripts manually
62rm -rf %{buildroot}%{_libexecdir}
63rm -f geoip/{Makefile*,.gitignore}
64chmod 0644 geoip/*
65
66# There is no -devel package. So no need for these files
67rm -f %{buildroot}%{_libdir}/*.{la,so}
68
69# prepare the dkms sources
70mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
71cp extensions/Kbuild extensions/Mbuild mconfig extensions/Makefile* extensions/mac.c extensions/xt_* extensions/compat_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}
72cp extensions/ACCOUNT/Kbuild extensions/ACCOUNT/Mbuild extensions/ACCOUNT/Makefile* extensions/ACCOUNT/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT
73cp extensions/pknock/Kbuild extensions/pknock/Mbuild extensions/pknock/Makefile* extensions/pknock/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
74
75# mconfig is not in parent dir anymore
76sed -i 's/${XA_ABSTOPSRCDIR}/${M}/' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
77
78# remove ipset-6 references to silence make clean errors
79sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
80sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Mbuild
81
82cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF
83PACKAGE_NAME="%{name}"
84PACKAGE_VERSION="%{version}-%{release}"
85AUTOINSTALL="yes"
86MAKE[0]="make -C \${kernel_source_dir} M=\\\$(pwd)"
87CLEAN="make -C \${kernel_source_dir} M=\\\$(pwd) clean"
88BUILT_MODULE_LOCATION[0]="ACCOUNT"
89DEST_MODULE_LOCATION[0]="/kernel/extra"
90BUILT_MODULE_NAME[0]="xt_ACCOUNT"
91BUILT_MODULE_LOCATION[1]="pknock"
92DEST_MODULE_LOCATION[1]="/kernel/extra"
93BUILT_MODULE_NAME[1]="xt_pknock"
94EOF
95
96i=2
97for mod in compat_xtables xt_CHAOS \
98xt_condition xt_DELUDE xt_DHCPMAC xt_DNETMAP xt_fuzzy xt_geoip xt_iface \
99xt_IPMARK xt_ipp2p xt_ipv4options xt_length2 xt_LOGMARK xt_lscan xt_psd \
100xt_quota2 xt_SYSRQ xt_TARPIT; do
101        echo -e "DEST_MODULE_LOCATION[$i]=\"/kernel/extra\"\nBUILT_MODULE_NAME[$i]=\"$mod\"" >> %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf
102        (( i = $i + 1 ))
103done
104
105install -m755 geoip/xt_geoip_dl %{buildroot}%{_sbindir}/
106install -m755 geoip/xt_geoip_build %{buildroot}%{_sbindir}/
107
108%post
109/sbin/ldconfig
110
111%preun
112
113%postun
114/sbin/ldconfig
115
116%post -n dkms-%{name}
117set -x
118/usr/sbin/dkms add     -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
119/usr/sbin/dkms build   -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
120/usr/sbin/dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force
121true
122
123%preun -n dkms-%{name}
124set -x
125/usr/sbin/dkms remove  -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all
126true
127
128%clean
129rm -rf %{buildroot}
130
131%files
132%defattr(-,root,root,-)
133%doc LICENSE README doc/* geoip
134/%{_lib}/xtables/*.so
135%{_libdir}/*.so.*
136%{_sbindir}/*
137%{_mandir}/man?/*
138
139%files -n dkms-%{name}
140%{_usr}/src/%{name}-%{version}-%{release}
141
142%changelog
143* Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.14-2
144- rebuilt with iptables-1.6.
145
146* Fri Dec 01 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.14-1
147- new upstream release.
148
149* Mon Jul 17 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13-1
150- new upstream release.
151
152* Mon May  8 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.12-1
153- new upstream release.
154
155* Sun Jun 26 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.10-1
156- new upstream release.
157
158* Sat Oct 31 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9-1
159- new upstream release.
160
161* Tue Jul  7 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.7-1
162- new upstream release.
163
164* Sat Nov  1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6-1
165- built for Vine Linux.
166- new upstream release.
167
168* Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.5-1
169- Update to 2.5
170
171* Sun Jan 12 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.4-1
172- Update to 2.4
173
174* Tue Jun 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.3-1
175- Update to 2.3
176
177* Thu Apr 18 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.2-1
178- Update to 2.2
179
180* Mon Jan 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1-1
181- Update to 2.1
182
183* Thu Oct 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.47.1-1
184- Update to 1.47.1
185
186* Wed Oct 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.46-1
187- Update to 1.46
188
189* Tue Jul 31 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.45-1
190- Update to 1.45
191
192* Thu Jun 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-3
193- Fix ipset path in F-16 and later
194
195* Tue Jun 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-2
196- Fix for UsrMove - rfbz#2360
197- Fix Conflict with ipset - rfbz#2201
198- Add Requires ipset >= 6.11 - rfbz#2226
199
200* Thu Apr 12 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.42-1
201- Update to 1.42
202
203* Tue Jan 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.41-1
204- Update to 1.41
205
206* Thu Nov 17 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.39-1
207- Update to 1.39
208
209* Wed Oct 27 2010 Chen Lei <supercyper@163.com> - 1.30-1
210- update to 1.30
211
212* Sun Jul 25 2010 Chen Lei <supercyper@163.com> - 1.28-1
213- update to 1.28
214
215* Mon Jun 28 2010 Chen Lei <supercyper@163.com> - 1.27-2
216- rebuild for kernel 2.6.35
217
218* Mon May 31 2010 Chen Lei <supercyper@163.com> - 1.27-1
219- update to 1.27
220
221* Sun May 02 2010 Chen Lei <supercyper@163.com> - 1.26-1
222- update to 1.26
223
224* Mon Apr 26 2010 Chen Lei <supercyper@163.com> - 1.25-1
225- update to 1.25
226
227* Sun Apr 25 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.24-2
228- rebuilt
229
230* Thu Mar 18 2010 Chen Lei <supercyper@163.com> - 1.24-1
231- initial rpm build
Note: See TracBrowser for help on using the repository browser.