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