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

Revision 11164, 7.0 KB checked in by tomop, 7 years ago (diff)

xtables-addons-2.13-1

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