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

Revision 9779, 7.3 KB checked in by tomop, 8 years ago (diff)

xtables-addons-2.9-1

Line 
1Name:           xtables-addons
2Summary:        Extensions targets and matches for iptables
3Version:        2.9
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
10Source1:        ipset.init
11Source2:        ipset-config
12BuildRequires:  iptables-devel >= 1.4.5
13BuildRequires:  autoconf automake libtool
14Provides:       %{name}-kmod-common = %{version}
15Requires(post): chkconfig
16Requires(preun): chkconfig
17# This is for /sbin/service
18Requires(preun): initscripts
19Requires(postun): initscripts
20Requires:       ipset >= 6.11
21Obsoletes:      %{name}-devel < 1.27-1
22
23%description
24Xtables-addons provides extra modules for iptables not present in the kernel,
25and is the successor of patch-o-matic. Extensions includes new targets like
26TEE, TARPIT, CHAOS, or modules like geoip, ipset, and account.
27
28This package provides the userspace libraries for iptables to use extensions
29in the %{name}-kmod package. You must also install the
30%{name}-kmod package.
31
32%package -n dkms-%{name}
33Summary:        dkms package for xtables-addons
34Group:          System Environment/Kernel
35Requires:       dkms
36Requires:       kernel-devel >= 3.7
37Requires(post): dkms
38Requires(preun):dkms
39
40%description -n dkms-%{name}
41This contains the dkms package building the xtables-addons kernel modules.
42
43%prep
44%setup -q -n %{name}-%{version}
45./autogen.sh
46if [ ! -e /%{_lib}/xtables/libxt_CHECKSUM.so ]; then
47        sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' mconfig
48fi
49if [ ! -e /%{_lib}/xtables/libxt_TEE.so ]; then
50        sed -i 's/build_TEE=/build_TEE=m/' mconfig
51fi
52sed -i 's/build_ipset6=/build_ipset6=m/' mconfig
53
54%build
55%configure --without-kbuild
56
57make V=1 %{?_smp_mflags}
58
59%install
60make DESTDIR=%{buildroot} install
61
62# We add xt_geoip database scripts manually
63rm -rf %{buildroot}%{_libexecdir}
64rm -f geoip/{Makefile*,.gitignore}
65chmod 0644 geoip/*
66
67# There is no -devel package. So no need for these files
68rm -f %{buildroot}%{_libdir}/*.{la,so}
69
70# install init scripts and configuration files
71install -D -pm 0755 %{SOURCE1} %{buildroot}%{_initddir}/ipset
72install -D -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ipset-config
73
74# prepare the dkms sources
75mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
76cp extensions/Kbuild extensions/Mbuild mconfig extensions/Makefile* extensions/mac.c extensions/xt_* extensions/compat_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}
77cp extensions/ACCOUNT/Kbuild extensions/ACCOUNT/Mbuild extensions/ACCOUNT/Makefile* extensions/ACCOUNT/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ACCOUNT
78cp extensions/pknock/Kbuild extensions/pknock/Mbuild extensions/pknock/Makefile* extensions/pknock/xt_* %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/pknock
79
80# mconfig is not in parent dir anymore
81sed -i 's/${XA_ABSTOPSRCDIR}/${M}/' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
82
83# remove ipset-6 references to silence make clean errors
84sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Kbuild
85sed -i '/ipset-6/ d' %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/Mbuild
86
87cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF
88PACKAGE_NAME="%{name}"
89PACKAGE_VERSION="%{version}-%{release}"
90AUTOINSTALL="yes"
91MAKE[0]="make -C \${kernel_source_dir} M=\\\$(pwd)"
92CLEAN="make -C \${kernel_source_dir} M=\\\$(pwd) clean"
93BUILT_MODULE_LOCATION[0]="ACCOUNT"
94DEST_MODULE_LOCATION[0]="/kernel/extra"
95BUILT_MODULE_NAME[0]="xt_ACCOUNT"
96BUILT_MODULE_LOCATION[1]="pknock"
97DEST_MODULE_LOCATION[1]="/kernel/extra"
98BUILT_MODULE_NAME[1]="xt_pknock"
99EOF
100
101i=2
102for mod in compat_xtables xt_CHAOS \
103xt_condition xt_DELUDE xt_DHCPMAC xt_DNETMAP xt_fuzzy xt_geoip xt_iface \
104xt_IPMARK xt_ipp2p xt_ipv4options xt_length2 xt_LOGMARK xt_lscan xt_psd \
105xt_quota2 xt_SYSRQ xt_TARPIT; do
106        echo -e "DEST_MODULE_LOCATION[$i]=\"/kernel/extra\"\nBUILT_MODULE_NAME[$i]=\"$mod\"" >> %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf
107        (( i = $i + 1 ))
108done
109
110install -m755 geoip/xt_geoip_dl %{buildroot}%{_sbindir}/
111install -m755 geoip/xt_geoip_build %{buildroot}%{_sbindir}/
112
113%post
114/sbin/ldconfig
115/sbin/chkconfig --add ipset
116
117%preun
118if [ $1 = 0 ] ; then
119    /sbin/service ipset stop >/dev/null 2>&1
120    /sbin/chkconfig --del ipset
121fi
122
123%postun
124/sbin/ldconfig
125if [ "$1" -ge "1" ] ; then
126    /sbin/service ipset condrestart >/dev/null 2>&1 || :
127fi
128
129%post -n dkms-%{name}
130set -x
131/usr/sbin/dkms add     -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
132/usr/sbin/dkms build   -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
133/usr/sbin/dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force
134true
135
136%preun -n dkms-%{name}
137set -x
138/usr/sbin/dkms remove  -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all
139true
140
141%clean
142rm -rf %{buildroot}
143
144%files
145%defattr(-,root,root,-)
146%doc LICENSE README doc/* geoip
147%attr(0755,root,root) %{_initddir}/*
148%config(noreplace) %{_sysconfdir}/sysconfig/*
149/%{_lib}/xtables/*.so
150%{_libdir}/*.so.*
151%{_sbindir}/*
152%{_mandir}/man?/*
153
154%files -n dkms-%{name}
155%{_usr}/src/%{name}-%{version}-%{release}
156
157%changelog
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.