]>
Commit | Line | Data |
---|---|---|
8bb72a08 | 1 | # TODO |
0330c995 | 2 | # - descriptions |
8af0bca6 ER |
3 | # - package referenec implementation iptaccount(8) and userspace lib |
4 | # /usr/lib64/libxt_ACCOUNT_cl.la | |
5 | # /usr/lib64/libxt_ACCOUNT_cl.so | |
6 | # /usr/lib64/libxt_ACCOUNT_cl.so.0 | |
7 | # /usr/lib64/libxt_ACCOUNT_cl.so.0.0.0 | |
8 | # /usr/sbin/iptaccount | |
9 | # and if packaged can remove debuginfo package omit | |
10 | # - subpackage for geoip due extra deps | |
8bb72a08 | 11 | # |
2741a7bf AM |
12 | # Conditional build: |
13 | %bcond_without dist_kernel # without distribution kernel | |
64731849 TP |
14 | %bcond_without kernel # don't build kernel modules |
15 | %bcond_without userspace # # don't build userspace tools | |
16 | %bcond_with verbose # verbose build (V=1) | |
17 | ||
18 | %if %{without kernel} | |
19 | %undefine with_dist_kernel | |
20 | %endif | |
21 | %if "%{_alt_kernel}" != "%{nil}" | |
22 | %undefine with_userspace | |
23 | %endif | |
24 | %if %{without userspace} | |
25 | # nothing to be placed to debuginfo package | |
26 | %define _enable_debug_packages 0 | |
27 | %endif | |
28 | ||
8af0bca6 | 29 | %define rel 0.1 |
2741a7bf AM |
30 | Summary: Extensible packet filtering system && extensible NAT system |
31 | Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT) | |
32 | Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x | |
33 | Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux | |
34 | Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux | |
35 | Summary(zh_CN.UTF-8): Linux内核包过滤管理工具 | |
36 | Name: xtables-addons | |
8af0bca6 | 37 | Version: 1.25 |
64731849 | 38 | Release: %{rel} |
2741a7bf | 39 | License: GPL |
64731849 | 40 | Group: Networking/Admin |
8af0bca6 ER |
41 | Source0: http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2 |
42 | # Source0-md5: d2765d1e6be6194b2c24efa6684a6874 | |
564b72e7 | 43 | URL: http://xtables-addons.sourceforge.net/ |
8af0bca6 | 44 | Patch0: kernelrelease.patch |
011c75bf KK |
45 | BuildRequires: autoconf |
46 | BuildRequires: automake | |
3e68c602 | 47 | BuildRequires: iptables-devel >= 1.4.3 |
0330c995 | 48 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25} |
011c75bf | 49 | BuildRequires: libtool |
62f40bbf | 50 | BuildRequires: pkgconfig |
0330c995 | 51 | BuildRequires: rpmbuild(macros) >= 1.379 |
3e68c602 | 52 | Requires: iptables >= 1.4.3 |
2741a7bf AM |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
54 | ||
bcb7e0a4 ER |
55 | # use macro, so adapter won't try to wrap |
56 | %define kpackage kernel%{_alt_kernel}-net-xtables-addons = %{rel}@%{_kernel_ver_str} | |
57 | ||
2741a7bf AM |
58 | %description |
59 | An extensible NAT system, and an extensible packet filtering system. | |
60 | Replacement of ipchains in 2.6 and higher kernels. | |
61 | ||
bcb7e0a4 ER |
62 | You need %{kpackage} installed for the tools to work. |
63 | ||
2741a7bf AM |
64 | %description -l pl.UTF-8 |
65 | Wydajny system translacji adresów (NAT) oraz system filtrowania | |
66 | pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych. | |
67 | ||
68 | %description -l pt_BR.UTF-8 | |
69 | Esta é a ferramenta que controla o código de filtragem de pacotes do | |
70 | kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode | |
71 | configurar filtros de pacotes, NAT, mascaramento (masquerading), | |
72 | regras dinâmicas (stateful inspection), etc. | |
73 | ||
74 | %description -l ru.UTF-8 | |
75 | xtables-addons управляют кодом фильтрации сетевых пакетов в ядре | |
76 | Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и | |
77 | IP маскарадинг, и т.п. | |
78 | ||
79 | %description -l uk.UTF-8 | |
80 | xtables-addons управляють кодом фільтрації пакетів мережі в ядрі | |
81 | Linux. Вони дозволяють вам встановлювати міжмережеві екрани | |
82 | (firewalls) та IP маскарадинг, тощо. | |
83 | ||
64731849 | 84 | %package -n kernel%{_alt_kernel}-net-xtables-addons |
bcb7e0a4 | 85 | Summary: Kernel modules for xtables addons |
e3c9233c | 86 | Summary(pl.UTF-8): Moudły jądra dla xtables addons |
bcb7e0a4 | 87 | Release: %{rel}@%{_kernel_ver_str} |
64731849 | 88 | Group: Base/Kernel |
8af0bca6 | 89 | Conflicts: xtables-geoip < 20090901-2 |
a3a7bc9c ER |
90 | # VERSION only dependency is intentional, for allowing multiple kernel pkgs and |
91 | # single userspace package installs. | |
92 | Requires: %{name} = %{version} | |
64731849 TP |
93 | %{?with_dist_kernel:%requires_releq_kernel} |
94 | Requires(post,postun): /sbin/depmod | |
95 | ||
96 | %description -n kernel%{_alt_kernel}-net-xtables-addons | |
bcb7e0a4 | 97 | Kernel modules for xtables addons. |
64731849 | 98 | |
e3c9233c | 99 | %description -n kernel%{_alt_kernel}-net-xtables-addons -l pl.UTF-8 |
100 | Moduły jądra dla xtables addons. | |
101 | ||
2741a7bf AM |
102 | %prep |
103 | %setup -q | |
7ad03426 | 104 | %patch0 -p1 |
2741a7bf | 105 | |
564b72e7 | 106 | %{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig |
107 | ||
2741a7bf | 108 | %build |
011c75bf KK |
109 | %{__libtoolize} |
110 | %{__aclocal} | |
111 | %{__autoconf} | |
112 | %{__automake} | |
2741a7bf | 113 | %configure \ |
8af0bca6 | 114 | --with-kbuild=no |
7ad03426 | 115 | |
116 | %if %{with kernel} | |
8af0bca6 ER |
117 | srcdir=${PWD:-$(pwd)} |
118 | %build_kernel_modules XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables | |
7ad03426 | 119 | %endif |
120 | ||
121 | %if %{with userspace} | |
8af0bca6 | 122 | %{__make} |
7ad03426 | 123 | %endif |
2741a7bf AM |
124 | |
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
f0af06f8 | 127 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8} |
2741a7bf | 128 | |
7ad03426 | 129 | %if %{with kernel} |
84556dc6 PS |
130 | cd extensions |
131 | %install_kernel_modules -m compat_xtables -d kernel/net/netfilter | |
bcb7e0a4 | 132 | install -p xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter |
84556dc6 | 133 | cd .. |
7ad03426 | 134 | %endif |
84556dc6 | 135 | |
7ad03426 | 136 | %if %{with userspace} |
84556dc6 PS |
137 | %{__make} -C extensions install \ |
138 | DESTDIR=$RPM_BUILD_ROOT | |
84556dc6 | 139 | |
8af0bca6 ER |
140 | install -d $RPM_BUILD_ROOT%{_mandir}/man8 |
141 | cp -a xtables-addons.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
7ad03426 | 142 | %endif |
2741a7bf AM |
143 | |
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
64731849 | 147 | %post -n kernel%{_alt_kernel}-net-xtables-addons |
0330c995 | 148 | %depmod %{_kernel_ver} |
149 | ||
64731849 | 150 | %postun -n kernel%{_alt_kernel}-net-xtables-addons |
0330c995 | 151 | %depmod %{_kernel_ver} |
152 | ||
64731849 | 153 | %if %{with userspace} |
2741a7bf AM |
154 | %files |
155 | %defattr(644,root,root,755) | |
edb92c36 | 156 | %attr(755,root,root) %{_libdir}/xtables/libxt_*.so |
8af0bca6 | 157 | %{_mandir}/man8/xtables-addons.8* |
7ad03426 | 158 | %endif |
64731849 | 159 | |
7ad03426 | 160 | %if %{with kernel} |
64731849 TP |
161 | %files -n kernel%{_alt_kernel}-net-xtables-addons |
162 | %defattr(644,root,root,755) | |
84556dc6 | 163 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz |
edb92c36 | 164 | /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz |
7ad03426 | 165 | %endif |