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