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