]>
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 | # |
da544e81 | 11 | %define rel 0.9 |
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 | |
0330c995 | 19 | Version: 1.5.4.1 |
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 | |
0330c995 | 24 | # Source0-md5: f78352e9021986347cd347edc82c40c2 |
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 |
2741a7bf AM |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
37 | An extensible NAT system, and an extensible packet filtering system. | |
38 | Replacement of ipchains in 2.6 and higher kernels. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Wydajny system translacji adresów (NAT) oraz system filtrowania | |
42 | pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych. | |
43 | ||
44 | %description -l pt_BR.UTF-8 | |
45 | Esta é a ferramenta que controla o código de filtragem de pacotes do | |
46 | kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode | |
47 | configurar filtros de pacotes, NAT, mascaramento (masquerading), | |
48 | regras dinâmicas (stateful inspection), etc. | |
49 | ||
50 | %description -l ru.UTF-8 | |
51 | xtables-addons управляют кодом фильтрации сетевых пакетов в ядре | |
52 | Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и | |
53 | IP маскарадинг, и т.п. | |
54 | ||
55 | %description -l uk.UTF-8 | |
56 | xtables-addons управляють кодом фільтрації пакетів мережі в ядрі | |
57 | Linux. Вони дозволяють вам встановлювати міжмережеві екрани | |
58 | (firewalls) та IP маскарадинг, тощо. | |
59 | ||
60 | %prep | |
61 | %setup -q | |
7ad03426 | 62 | %patch0 -p1 |
da544e81 | 63 | %patch1 -p1 |
2741a7bf AM |
64 | |
65 | %build | |
66 | %configure \ | |
2659fab6 | 67 | --with-kbuild=%{_kernelsrcdir} \ |
2741a7bf | 68 | --with-ksource=%{_kernelsrcdir} |
8bb72a08 | 69 | export XA_TOPSRCDIR=$PWD |
7ad03426 | 70 | |
71 | %if %{with kernel} | |
8bb72a08 | 72 | %build_kernel_modules -C extensions -m compat_xtables |
7ad03426 | 73 | %endif |
74 | ||
75 | %if %{with userspace} | |
76 | %{__make} -C extensions libs | |
77 | %endif | |
2741a7bf AM |
78 | |
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
7ad03426 | 82 | %if %{with kernel} |
8bb72a08 | 83 | %install_kernel_modules -m extensions/compat_xtables -d kernel/net/netfilter |
84 | install extensions/xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter | |
7ad03426 | 85 | %endif |
86 | %if %{with userspace} | |
87 | %{__make} -C extensions libs_install \ | |
2741a7bf | 88 | DESTDIR=$RPM_BUILD_ROOT |
7ad03426 | 89 | %endif |
2741a7bf AM |
90 | |
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
0330c995 | 94 | %post |
95 | %depmod %{_kernel_ver} | |
96 | ||
97 | %postun | |
98 | %depmod %{_kernel_ver} | |
99 | ||
2741a7bf AM |
100 | %files |
101 | %defattr(644,root,root,755) | |
7ad03426 | 102 | %if %{with userspace} |
0330c995 | 103 | %attr(755,root,root) %{_libdir}/xtables/libxt_CHAOS.so |
104 | %attr(755,root,root) %{_libdir}/xtables/libxt_DELUDE.so | |
105 | %attr(755,root,root) %{_libdir}/xtables/libxt_IPMARK.so | |
106 | %attr(755,root,root) %{_libdir}/xtables/libxt_LOGMARK.so | |
107 | %attr(755,root,root) %{_libdir}/xtables/libxt_TARPIT.so | |
108 | %attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so | |
109 | %attr(755,root,root) %{_libdir}/xtables/libxt_condition.so | |
110 | %attr(755,root,root) %{_libdir}/xtables/libxt_geoip.so | |
111 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipp2p.so | |
112 | %attr(755,root,root) %{_libdir}/xtables/libxt_portscan.so | |
7ad03426 | 113 | %endif |
114 | %if %{with kernel} | |
8bb72a08 | 115 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/* |
7ad03426 | 116 | %endif |