]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- release 7
[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
603f6f34 22%define rel 7
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
50%description
51An extensible NAT system, and an extensible packet filtering system.
52Replacement of ipchains in 2.6 and higher kernels.
53
54%description -l pl.UTF-8
55Wydajny system translacji adresów (NAT) oraz system filtrowania
56pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych.
57
58%description -l pt_BR.UTF-8
59Esta é a ferramenta que controla o código de filtragem de pacotes do
60kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode
61configurar filtros de pacotes, NAT, mascaramento (masquerading),
62regras dinâmicas (stateful inspection), etc.
63
64%description -l ru.UTF-8
65xtables-addons управляют кодом фильтрации сетевых пакетов в ядре
66Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и
67IP маскарадинг, и т.п.
68
69%description -l uk.UTF-8
70xtables-addons управляють кодом фільтрації пакетів мережі в ядрі
71Linux. Вони дозволяють вам встановлювати міжмережеві екрани
72(firewalls) та IP маскарадинг, тощо.
73
64731849
TP
74%package -n kernel%{_alt_kernel}-net-xtables-addons
75Summary: -
76Summary(pl.UTF-8): -
77Release: %{release}@%{_kernel_ver_str}
78Group: Base/Kernel
79Requires: %{name} = %{version}-%{rel}
80%{?with_dist_kernel:%requires_releq_kernel}
81Requires(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
afdf4d1b 89%patch2 -p1
2741a7bf 90
564b72e7 91%{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig
92
2741a7bf 93%build
011c75bf
KK
94%{__libtoolize}
95%{__aclocal}
96%{__autoconf}
97%{__automake}
2741a7bf 98%configure \
2659fab6 99 --with-kbuild=%{_kernelsrcdir} \
2741a7bf 100 --with-ksource=%{_kernelsrcdir}
84556dc6 101
8bb72a08 102export XA_TOPSRCDIR=$PWD
7ad03426 103
104%if %{with kernel}
8bb72a08 105%build_kernel_modules -C extensions -m compat_xtables
7ad03426 106%endif
107
108%if %{with userspace}
84556dc6 109%{__make} -C extensions
7ad03426 110%endif
2741a7bf
AM
111
112%install
113rm -rf $RPM_BUILD_ROOT
f0af06f8 114install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
2741a7bf 115
7ad03426 116%if %{with kernel}
84556dc6
PS
117cd extensions
118%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
119install xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 120cd ..
7ad03426 121%endif
84556dc6 122
7ad03426 123%if %{with userspace}
84556dc6
PS
124%{__make} -C extensions install \
125 DESTDIR=$RPM_BUILD_ROOT
84556dc6
PS
126
127cd extensions
128for m in $(cat .manpages.lst); do
129 install libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8
130done
131cd ..
7ad03426 132%endif
2741a7bf
AM
133
134%clean
135rm -rf $RPM_BUILD_ROOT
136
64731849 137%post -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 138%depmod %{_kernel_ver}
139
64731849 140%postun -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 141%depmod %{_kernel_ver}
142
64731849 143%if %{with userspace}
2741a7bf
AM
144%files
145%defattr(644,root,root,755)
edb92c36
TP
146%attr(755,root,root) %{_libdir}/xtables/libxt_*.so
147%{_mandir}/man8/libxt_*.*
7ad03426 148%endif
64731849 149
7ad03426 150%if %{with kernel}
64731849
TP
151%files -n kernel%{_alt_kernel}-net-xtables-addons
152%defattr(644,root,root,755)
84556dc6 153/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
edb92c36 154/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz
7ad03426 155%endif
This page took 0.124984 seconds and 4 git commands to generate.