]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- O: ipset-init.
[packages/xtables-addons.git] / xtables-addons.spec
CommitLineData
2741a7bf 1#
8bb72a08 2# TODO
0330c995 3# - kernel modules package (or not, 2 packages with mutual R?)
4# - descriptions
8bb72a08 5#
2741a7bf
AM
6# Conditional build:
7%bcond_without dist_kernel # without distribution kernel
7ad03426 8%bcond_without kernel
9%bcond_without userspace
2741a7bf 10#
84556dc6 11%define rel 0.1
2741a7bf
AM
12Summary: Extensible packet filtering system && extensible NAT system
13Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT)
14Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x
15Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux
16Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux
17Summary(zh_CN.UTF-8): Linux内核包过滤管理工具
18Name: xtables-addons
84556dc6 19Version: 1.5.7
0330c995 20Release: %{rel}@%{_kernel_ver_str}
2741a7bf
AM
21License: GPL
22Group: Networking/Daemons
23Source0: http://dev.computergmbh.de/files/xtables/%{name}-%{version}.tar.bz2
84556dc6 24# Source0-md5: cfd0a0997efd4084d0505f93ff28c4cf
f0af06f8 25Source1: ipset.init
7ad03426 26Patch0: %{name}-libs.patch
da544e81 27Patch1: %{name}-geoip-dbpath.patch
e5ee62e2 28Patch2: %{name}-help.patch
0330c995 29#BuildRequires: xtables-devel >= 1.5.2
30BuildRequires: iptables-devel >= 1.4.1
31%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25}
32BuildRequires: rpmbuild(macros) >= 1.379
33%{?with_dist_kernel:%requires_releq_kernel}
34Requires(post,postun): /sbin/depmod
da544e81 35Requires: iptables >= 1.4.1
84556dc6 36Obsoletes: ipset
f0af06f8 37Obsoletes: ipset-init
2741a7bf
AM
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41An extensible NAT system, and an extensible packet filtering system.
42Replacement of ipchains in 2.6 and higher kernels.
43
44%description -l pl.UTF-8
45Wydajny system translacji adresów (NAT) oraz system filtrowania
46pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych.
47
48%description -l pt_BR.UTF-8
49Esta é a ferramenta que controla o código de filtragem de pacotes do
50kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode
51configurar filtros de pacotes, NAT, mascaramento (masquerading),
52regras dinâmicas (stateful inspection), etc.
53
54%description -l ru.UTF-8
55xtables-addons управляют кодом фильтрации сетевых пакетов в ядре
56Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и
57IP маскарадинг, и т.п.
58
59%description -l uk.UTF-8
60xtables-addons управляють кодом фільтрації пакетів мережі в ядрі
61Linux. Вони дозволяють вам встановлювати міжмережеві екрани
62(firewalls) та IP маскарадинг, тощо.
63
64%prep
65%setup -q
7ad03426 66%patch0 -p1
da544e81 67%patch1 -p1
e5ee62e2 68%patch2 -p1
2741a7bf
AM
69
70%build
71%configure \
2659fab6 72 --with-kbuild=%{_kernelsrcdir} \
2741a7bf 73 --with-ksource=%{_kernelsrcdir}
84556dc6 74
8bb72a08 75export XA_TOPSRCDIR=$PWD
7ad03426 76
77%if %{with kernel}
8bb72a08 78%build_kernel_modules -C extensions -m compat_xtables
7ad03426 79%endif
80
81%if %{with userspace}
84556dc6
PS
82%{__make} -C extensions
83%{__make} -C extensions/ipset
7ad03426 84%endif
2741a7bf
AM
85
86%install
87rm -rf $RPM_BUILD_ROOT
f0af06f8 88install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
2741a7bf 89
7ad03426 90%if %{with kernel}
84556dc6
PS
91cd extensions
92%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
93install xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
94install ipset/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
95cd ..
7ad03426 96%endif
84556dc6 97
7ad03426 98%if %{with userspace}
f0af06f8
PS
99install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ipset
100
84556dc6
PS
101%{__make} -C extensions install \
102 DESTDIR=$RPM_BUILD_ROOT
103%{__make} -C extensions/ipset install \
2741a7bf 104 DESTDIR=$RPM_BUILD_ROOT
84556dc6
PS
105
106cd extensions
107for m in $(cat .manpages.lst); do
108 install libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8
109done
110cd ..
7ad03426 111%endif
2741a7bf
AM
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
0330c995 116%post
117%depmod %{_kernel_ver}
f0af06f8 118/sbin/chkconfig --add ipset
0330c995 119
120%postun
121%depmod %{_kernel_ver}
f0af06f8
PS
122if [ "$1" = "0" ]; then
123 /sbin/chkconfig --del ipset
124fi
0330c995 125
2741a7bf
AM
126%files
127%defattr(644,root,root,755)
7ad03426 128%if %{with userspace}
84556dc6 129# ipset
f0af06f8 130%attr(754,root,root) /etc/rc.d/init.d/ipset
84556dc6
PS
131%attr(755,root,root) %{_libdir}/xtables/libipset_iphash.so
132%attr(755,root,root) %{_libdir}/xtables/libipset_ipmap.so
133%attr(755,root,root) %{_libdir}/xtables/libipset_ipporthash.so
134%attr(755,root,root) %{_libdir}/xtables/libipset_iptree.so
135%attr(755,root,root) %{_libdir}/xtables/libipset_iptreemap.so
136%attr(755,root,root) %{_libdir}/xtables/libipset_macipmap.so
137%attr(755,root,root) %{_libdir}/xtables/libipset_nethash.so
138%attr(755,root,root) %{_libdir}/xtables/libipset_portmap.so
139%attr(755,root,root) %{_sbindir}/ipset
140%{_mandir}/man8/ipset.*
141#
0330c995 142%attr(755,root,root) %{_libdir}/xtables/libxt_CHAOS.so
143%attr(755,root,root) %{_libdir}/xtables/libxt_DELUDE.so
84556dc6 144%attr(755,root,root) %{_libdir}/xtables/libxt_DHCPADDR.so
0330c995 145%attr(755,root,root) %{_libdir}/xtables/libxt_IPMARK.so
146%attr(755,root,root) %{_libdir}/xtables/libxt_LOGMARK.so
84556dc6 147%attr(755,root,root) %{_libdir}/xtables/libxt_SYSRQ.so
0330c995 148%attr(755,root,root) %{_libdir}/xtables/libxt_TARPIT.so
149%attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so
150%attr(755,root,root) %{_libdir}/xtables/libxt_condition.so
84556dc6
PS
151%attr(755,root,root) %{_libdir}/xtables/libxt_dhcpaddr.so
152%attr(755,root,root) %{_libdir}/xtables/libxt_fuzzy.so
0330c995 153%attr(755,root,root) %{_libdir}/xtables/libxt_geoip.so
154%attr(755,root,root) %{_libdir}/xtables/libxt_ipp2p.so
155%attr(755,root,root) %{_libdir}/xtables/libxt_portscan.so
84556dc6
PS
156%attr(755,root,root) %{_libdir}/xtables/libxt_quota2.so
157%{_mandir}/man8/libxt_CHAOS.*
158%{_mandir}/man8/libxt_DELUDE.*
159%{_mandir}/man8/libxt_DHCPADDR.*
160%{_mandir}/man8/libxt_IPMARK.*
161%{_mandir}/man8/libxt_LOGMARK.*
162%{_mandir}/man8/libxt_SYSRQ.*
163%{_mandir}/man8/libxt_TARPIT.*
164%{_mandir}/man8/libxt_condition.*
165%{_mandir}/man8/libxt_dhcpaddr.*
166%{_mandir}/man8/libxt_fuzzy.*
167%{_mandir}/man8/libxt_geoip.*
168%{_mandir}/man8/libxt_ipp2p.*
169%{_mandir}/man8/libxt_portscan.*
170%{_mandir}/man8/libxt_quota2.*
7ad03426 171%endif
172%if %{with kernel}
84556dc6
PS
173# ipset
174/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set.ko.gz
175/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iphash.ko.gz
176/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_ipmap.ko.gz
177/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_ipporthash.ko.gz
178/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iptree.ko.gz
179/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iptreemap.ko.gz
180/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_macipmap.ko.gz
181/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_nethash.ko.gz
182/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_portmap.ko.gz
183/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_SET.ko.gz
184/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_set.ko.gz
185#
186/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
187/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_CHAOS.ko.gz
188/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DELUDE.ko.gz
189/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DHCPADDR.ko.gz
190/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_IPMARK.ko.gz
191/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_LOGMARK.ko.gz
192/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_SYSRQ.ko.gz
193/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TARPIT.ko.gz
194/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TEE.ko.gz
195/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_condition.ko.gz
196/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_fuzzy.ko.gz
197/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_geoip.ko.gz
198/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_ipp2p.ko.gz
199/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_portscan.ko.gz
200/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_quota2.ko.gz
7ad03426 201%endif
This page took 0.127545 seconds and 4 git commands to generate.