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