]>
Commit | Line | Data |
---|---|---|
2741a7bf | 1 | # |
8bb72a08 | 2 | # TODO |
0330c995 | 3 | # - descriptions |
8bb72a08 | 4 | # |
2741a7bf AM |
5 | # Conditional build: |
6 | %bcond_without dist_kernel # without distribution kernel | |
64731849 TP |
7 | %bcond_without kernel # don't build kernel modules |
8 | %bcond_without userspace # # don't build userspace tools | |
9 | %bcond_with verbose # verbose build (V=1) | |
10 | ||
11 | %if %{without kernel} | |
12 | %undefine with_dist_kernel | |
13 | %endif | |
14 | %if "%{_alt_kernel}" != "%{nil}" | |
15 | %undefine with_userspace | |
16 | %endif | |
17 | %if %{without userspace} | |
18 | # nothing to be placed to debuginfo package | |
19 | %define _enable_debug_packages 0 | |
20 | %endif | |
21 | ||
2741a7bf | 22 | # |
53841ae1 | 23 | %define rel 1 |
2741a7bf AM |
24 | Summary: Extensible packet filtering system && extensible NAT system |
25 | Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT) | |
26 | Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x | |
27 | Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux | |
28 | Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux | |
29 | Summary(zh_CN.UTF-8): Linux内核包过滤管理工具 | |
30 | Name: xtables-addons | |
53841ae1 | 31 | Version: 1.15 |
64731849 | 32 | Release: %{rel} |
2741a7bf | 33 | License: GPL |
64731849 | 34 | Group: Networking/Admin |
564b72e7 | 35 | Source0: http://dl.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2 |
53841ae1 | 36 | # Source0-md5: 034c3b40684a934af5ecb28a06f222b5 |
564b72e7 | 37 | URL: http://xtables-addons.sourceforge.net/ |
7ad03426 | 38 | Patch0: %{name}-libs.patch |
da544e81 | 39 | Patch1: %{name}-geoip-dbpath.patch |
011c75bf KK |
40 | BuildRequires: autoconf |
41 | BuildRequires: automake | |
3e68c602 | 42 | BuildRequires: iptables-devel >= 1.4.3 |
0330c995 | 43 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25} |
011c75bf | 44 | BuildRequires: libtool |
62f40bbf | 45 | BuildRequires: pkgconfig |
0330c995 | 46 | BuildRequires: rpmbuild(macros) >= 1.379 |
3e68c602 | 47 | Requires: iptables >= 1.4.3 |
2741a7bf AM |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
51 | An extensible NAT system, and an extensible packet filtering system. | |
52 | Replacement of ipchains in 2.6 and higher kernels. | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | Wydajny system translacji adresów (NAT) oraz system filtrowania | |
56 | pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych. | |
57 | ||
58 | %description -l pt_BR.UTF-8 | |
59 | Esta é a ferramenta que controla o código de filtragem de pacotes do | |
60 | kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode | |
61 | configurar filtros de pacotes, NAT, mascaramento (masquerading), | |
62 | regras dinâmicas (stateful inspection), etc. | |
63 | ||
64 | %description -l ru.UTF-8 | |
65 | xtables-addons управляют кодом фильтрации сетевых пакетов в ядре | |
66 | Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и | |
67 | IP маскарадинг, и т.п. | |
68 | ||
69 | %description -l uk.UTF-8 | |
70 | xtables-addons управляють кодом фільтрації пакетів мережі в ядрі | |
71 | Linux. Вони дозволяють вам встановлювати міжмережеві екрани | |
72 | (firewalls) та IP маскарадинг, тощо. | |
73 | ||
64731849 TP |
74 | %package -n kernel%{_alt_kernel}-net-xtables-addons |
75 | Summary: - | |
76 | Summary(pl.UTF-8): - | |
77 | Release: %{release}@%{_kernel_ver_str} | |
78 | Group: Base/Kernel | |
79 | Requires: %{name} = %{version}-%{rel} | |
80 | %{?with_dist_kernel:%requires_releq_kernel} | |
81 | Requires(post,postun): /sbin/depmod | |
82 | ||
83 | %description -n kernel%{_alt_kernel}-net-xtables-addons | |
84 | ||
2741a7bf AM |
85 | %prep |
86 | %setup -q | |
7ad03426 | 87 | %patch0 -p1 |
da544e81 | 88 | %patch1 -p1 |
2741a7bf | 89 | |
564b72e7 | 90 | %{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig |
91 | ||
2741a7bf | 92 | %build |
011c75bf KK |
93 | %{__libtoolize} |
94 | %{__aclocal} | |
95 | %{__autoconf} | |
96 | %{__automake} | |
2741a7bf | 97 | %configure \ |
2659fab6 | 98 | --with-kbuild=%{_kernelsrcdir} \ |
2741a7bf | 99 | --with-ksource=%{_kernelsrcdir} |
84556dc6 | 100 | |
8bb72a08 | 101 | export XA_TOPSRCDIR=$PWD |
7ad03426 | 102 | |
103 | %if %{with kernel} | |
8bb72a08 | 104 | %build_kernel_modules -C extensions -m compat_xtables |
7ad03426 | 105 | %endif |
106 | ||
107 | %if %{with userspace} | |
84556dc6 | 108 | %{__make} -C extensions |
7ad03426 | 109 | %endif |
2741a7bf AM |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
f0af06f8 | 113 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8} |
2741a7bf | 114 | |
7ad03426 | 115 | %if %{with kernel} |
84556dc6 PS |
116 | cd extensions |
117 | %install_kernel_modules -m compat_xtables -d kernel/net/netfilter | |
118 | install xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter | |
84556dc6 | 119 | cd .. |
7ad03426 | 120 | %endif |
84556dc6 | 121 | |
7ad03426 | 122 | %if %{with userspace} |
84556dc6 PS |
123 | %{__make} -C extensions install \ |
124 | DESTDIR=$RPM_BUILD_ROOT | |
84556dc6 PS |
125 | |
126 | cd extensions | |
127 | for m in $(cat .manpages.lst); do | |
128 | install libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8 | |
129 | done | |
130 | cd .. | |
7ad03426 | 131 | %endif |
2741a7bf AM |
132 | |
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
64731849 | 136 | %post -n kernel%{_alt_kernel}-net-xtables-addons |
0330c995 | 137 | %depmod %{_kernel_ver} |
138 | ||
64731849 | 139 | %postun -n kernel%{_alt_kernel}-net-xtables-addons |
0330c995 | 140 | %depmod %{_kernel_ver} |
141 | ||
64731849 | 142 | %if %{with userspace} |
2741a7bf AM |
143 | %files |
144 | %defattr(644,root,root,755) | |
0330c995 | 145 | %attr(755,root,root) %{_libdir}/xtables/libxt_CHAOS.so |
146 | %attr(755,root,root) %{_libdir}/xtables/libxt_DELUDE.so | |
62f40bbf | 147 | %attr(755,root,root) %{_libdir}/xtables/libxt_DHCPMAC.so |
0330c995 | 148 | %attr(755,root,root) %{_libdir}/xtables/libxt_IPMARK.so |
149 | %attr(755,root,root) %{_libdir}/xtables/libxt_LOGMARK.so | |
53841ae1 SP |
150 | %attr(755,root,root) %{_libdir}/xtables/libxt_RAWDNAT.so |
151 | %attr(755,root,root) %{_libdir}/xtables/libxt_RAWSNAT.so | |
62f40bbf | 152 | %attr(755,root,root) %{_libdir}/xtables/libxt_STEAL.so |
84556dc6 | 153 | %attr(755,root,root) %{_libdir}/xtables/libxt_SYSRQ.so |
0330c995 | 154 | %attr(755,root,root) %{_libdir}/xtables/libxt_TARPIT.so |
155 | %attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so | |
156 | %attr(755,root,root) %{_libdir}/xtables/libxt_condition.so | |
62f40bbf | 157 | %attr(755,root,root) %{_libdir}/xtables/libxt_dhcpmac.so |
84556dc6 | 158 | %attr(755,root,root) %{_libdir}/xtables/libxt_fuzzy.so |
0330c995 | 159 | %attr(755,root,root) %{_libdir}/xtables/libxt_geoip.so |
53841ae1 | 160 | %attr(755,root,root) %{_libdir}/xtables/libxt_iface.so |
0330c995 | 161 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipp2p.so |
62f40bbf | 162 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipv4options.so |
564b72e7 | 163 | %attr(755,root,root) %{_libdir}/xtables/libxt_lscan.so |
84556dc6 | 164 | %attr(755,root,root) %{_libdir}/xtables/libxt_quota2.so |
90ef35fc | 165 | %attr(755,root,root) %{_libdir}/xtables/libxt_length2.so |
84556dc6 PS |
166 | %{_mandir}/man8/libxt_CHAOS.* |
167 | %{_mandir}/man8/libxt_DELUDE.* | |
62f40bbf | 168 | %{_mandir}/man8/libxt_DHCPMAC.* |
90ef35fc | 169 | %{_mandir}/man8/libxt_ECHO.8 |
84556dc6 PS |
170 | %{_mandir}/man8/libxt_IPMARK.* |
171 | %{_mandir}/man8/libxt_LOGMARK.* | |
53841ae1 SP |
172 | %{_mandir}/man8/libxt_RAWDNAT.* |
173 | %{_mandir}/man8/libxt_RAWSNAT.* | |
62f40bbf | 174 | %{_mandir}/man8/libxt_STEAL.* |
84556dc6 PS |
175 | %{_mandir}/man8/libxt_SYSRQ.* |
176 | %{_mandir}/man8/libxt_TARPIT.* | |
90ef35fc | 177 | %{_mandir}/man8/libxt_TEE.8* |
84556dc6 | 178 | %{_mandir}/man8/libxt_condition.* |
62f40bbf | 179 | %{_mandir}/man8/libxt_dhcpmac.* |
84556dc6 PS |
180 | %{_mandir}/man8/libxt_fuzzy.* |
181 | %{_mandir}/man8/libxt_geoip.* | |
53841ae1 | 182 | %{_mandir}/man8/libxt_iface.* |
84556dc6 | 183 | %{_mandir}/man8/libxt_ipp2p.* |
62f40bbf | 184 | %{_mandir}/man8/libxt_ipv4options.* |
564b72e7 | 185 | %{_mandir}/man8/libxt_lscan.* |
84556dc6 | 186 | %{_mandir}/man8/libxt_quota2.* |
90ef35fc | 187 | %{_mandir}/man8/libxt_length.8* |
7ad03426 | 188 | %endif |
64731849 | 189 | |
7ad03426 | 190 | %if %{with kernel} |
64731849 TP |
191 | %files -n kernel%{_alt_kernel}-net-xtables-addons |
192 | %defattr(644,root,root,755) | |
84556dc6 PS |
193 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz |
194 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_CHAOS.ko.gz | |
195 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DELUDE.ko.gz | |
62f40bbf | 196 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DHCPMAC.ko.gz |
84556dc6 PS |
197 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_IPMARK.ko.gz |
198 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_LOGMARK.ko.gz | |
53841ae1 SP |
199 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_RAWNAT.ko.gz |
200 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_iface.ko.gz | |
62f40bbf | 201 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_STEAL.ko.gz |
84556dc6 PS |
202 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_SYSRQ.ko.gz |
203 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TARPIT.ko.gz | |
204 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TEE.ko.gz | |
205 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_condition.ko.gz | |
206 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_fuzzy.ko.gz | |
207 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_geoip.ko.gz | |
208 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_ipp2p.ko.gz | |
62f40bbf | 209 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_ipv4options.ko.gz |
564b72e7 | 210 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_lscan.ko.gz |
84556dc6 | 211 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_quota2.ko.gz |
90ef35fc | 212 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_length2.ko.gz |
7ad03426 | 213 | %endif |