]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- release 2
[packages/xtables-addons.git] / xtables-addons.spec
CommitLineData
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
4a059602 30%define rel 2
2741a7bf
AM
31Summary: Extensible packet filtering system && extensible NAT system
32Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT)
33Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x
34Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux
35Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux
36Summary(zh_CN.UTF-8): Linux内核包过滤管理工具
37Name: xtables-addons
9afca0fd 38Version: 1.26
64731849 39Release: %{rel}
2741a7bf 40License: GPL
64731849 41Group: Networking/Admin
8af0bca6 42Source0: http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2
9afca0fd 43# Source0-md5: 6091032318ee7fb46d82dec9ae5ae422
564b72e7 44URL: http://xtables-addons.sourceforge.net/
8af0bca6 45Patch0: kernelrelease.patch
011c75bf
KK
46BuildRequires: autoconf
47BuildRequires: automake
3e68c602 48BuildRequires: iptables-devel >= 1.4.3
0330c995 49%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25}
011c75bf 50BuildRequires: libtool
62f40bbf 51BuildRequires: pkgconfig
0330c995 52BuildRequires: rpmbuild(macros) >= 1.379
3e68c602 53Requires: iptables >= 1.4.3
2741a7bf
AM
54BuildRoot: %{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
60An extensible NAT system, and an extensible packet filtering system.
61Replacement of ipchains in 2.6 and higher kernels.
62
bcb7e0a4
ER
63You need %{kpackage} installed for the tools to work.
64
2741a7bf
AM
65%description -l pl.UTF-8
66Wydajny system translacji adresów (NAT) oraz system filtrowania
67pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych.
68
69%description -l pt_BR.UTF-8
70Esta é a ferramenta que controla o código de filtragem de pacotes do
71kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode
72configurar filtros de pacotes, NAT, mascaramento (masquerading),
73regras dinâmicas (stateful inspection), etc.
74
75%description -l ru.UTF-8
76xtables-addons управляют кодом фильтрации сетевых пакетов в ядре
77Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и
78IP маскарадинг, и т.п.
79
80%description -l uk.UTF-8
81xtables-addons управляють кодом фільтрації пакетів мережі в ядрі
82Linux. Вони дозволяють вам встановлювати міжмережеві екрани
83(firewalls) та IP маскарадинг, тощо.
84
64731849 85%package -n kernel%{_alt_kernel}-net-xtables-addons
bcb7e0a4 86Summary: Kernel modules for xtables addons
e3c9233c 87Summary(pl.UTF-8): Moudły jądra dla xtables addons
bcb7e0a4 88Release: %{rel}@%{_kernel_ver_str}
64731849 89Group: Base/Kernel
8af0bca6 90Conflicts: xtables-geoip < 20090901-2
a3a7bc9c
ER
91# VERSION only dependency is intentional, for allowing multiple kernel pkgs and
92# single userspace package installs.
93Requires: %{name} = %{version}
64731849
TP
94%{?with_dist_kernel:%requires_releq_kernel}
95Requires(post,postun): /sbin/depmod
96
97%description -n kernel%{_alt_kernel}-net-xtables-addons
bcb7e0a4 98Kernel modules for xtables addons.
64731849 99
e3c9233c 100%description -n kernel%{_alt_kernel}-net-xtables-addons -l pl.UTF-8
101Moduł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
ER
118srcdir=${PWD:-$(pwd)}
119%build_kernel_modules 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
127rm -rf $RPM_BUILD_ROOT
f0af06f8 128install -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
131cd extensions
132%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
bcb7e0a4 133install -p xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 134cd ..
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
141install -d $RPM_BUILD_ROOT%{_mandir}/man8
142cp -a xtables-addons.8 $RPM_BUILD_ROOT%{_mandir}/man8
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 157%attr(755,root,root) %{_libdir}/xtables/libxt_*.so
8af0bca6 158%{_mandir}/man8/xtables-addons.8*
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.12841 seconds and 4 git commands to generate.