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