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