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