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