]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- uptaccount todo is done
[packages/xtables-addons.git] / xtables-addons.spec
CommitLineData
8bb72a08 1# TODO
0330c995 2# - descriptions
9afca0fd
ER
3# - subpackage for geoip due extra deps? (it goes silly as then need THREE
4# packages installed for functionality (userspace,kernel,data packages...)
8bb72a08 5#
2741a7bf
AM
6# Conditional build:
7%bcond_without dist_kernel # without distribution kernel
64731849
TP
8%bcond_without kernel # don't build kernel modules
9%bcond_without userspace # # don't build userspace tools
10%bcond_with verbose # verbose build (V=1)
11
12%if %{without kernel}
13%undefine with_dist_kernel
14%endif
15%if "%{_alt_kernel}" != "%{nil}"
16%undefine with_userspace
17%endif
18%if %{without userspace}
19# nothing to be placed to debuginfo package
20%define _enable_debug_packages 0
21%endif
22
8f462252 23%define rel 1
2741a7bf
AM
24Summary: Extensible packet filtering system && extensible NAT system
25Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT)
26Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x
27Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux
28Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux
29Summary(zh_CN.UTF-8): Linux内核包过滤管理工具
30Name: xtables-addons
8f462252 31Version: 1.27
64731849 32Release: %{rel}
2741a7bf 33License: GPL
64731849 34Group: Networking/Admin
8f462252
AM
35Source0: http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.xz
36# Source0-md5: f4f65ce5361d7f8c0908ca3db37fa8ee
564b72e7 37URL: http://xtables-addons.sourceforge.net/
8af0bca6 38Patch0: kernelrelease.patch
011c75bf
KK
39BuildRequires: autoconf
40BuildRequires: automake
3e68c602 41BuildRequires: iptables-devel >= 1.4.3
0330c995 42%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25}
011c75bf 43BuildRequires: libtool
62f40bbf 44BuildRequires: pkgconfig
0330c995 45BuildRequires: rpmbuild(macros) >= 1.379
3e68c602 46Requires: iptables >= 1.4.3
2741a7bf
AM
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
bcb7e0a4
ER
49# use macro, so adapter won't try to wrap
50%define kpackage kernel%{_alt_kernel}-net-xtables-addons = %{rel}@%{_kernel_ver_str}
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
bcb7e0a4
ER
56You need %{kpackage} installed for the tools to work.
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
8af0bca6 83Conflicts: xtables-geoip < 20090901-2
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
2741a7bf 99
564b72e7 100%{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig
101
2741a7bf 102%build
011c75bf
KK
103%{__libtoolize}
104%{__aclocal}
105%{__autoconf}
106%{__automake}
2741a7bf 107%configure \
8af0bca6 108 --with-kbuild=no
7ad03426 109
110%if %{with kernel}
8af0bca6 111srcdir=${PWD:-$(pwd)}
8f462252 112%build_kernel_modules V=1 XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables
7ad03426 113%endif
114
115%if %{with userspace}
8af0bca6 116%{__make}
7ad03426 117%endif
2741a7bf
AM
118
119%install
120rm -rf $RPM_BUILD_ROOT
f0af06f8 121install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
2741a7bf 122
7ad03426 123%if %{with kernel}
84556dc6
PS
124cd extensions
125%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
bcb7e0a4 126install -p xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 127cd ..
7ad03426 128%endif
84556dc6 129
7ad03426 130%if %{with userspace}
84556dc6
PS
131%{__make} -C extensions install \
132 DESTDIR=$RPM_BUILD_ROOT
84556dc6 133
8af0bca6
ER
134install -d $RPM_BUILD_ROOT%{_mandir}/man8
135cp -a xtables-addons.8 $RPM_BUILD_ROOT%{_mandir}/man8
7ad03426 136%endif
2741a7bf
AM
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
8f462252
AM
141%post -p /sbin/ldconfig
142%postun -p /sbin/ldconfig
143
64731849 144%post -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 145%depmod %{_kernel_ver}
146
64731849 147%postun -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 148%depmod %{_kernel_ver}
149
64731849 150%if %{with userspace}
2741a7bf
AM
151%files
152%defattr(644,root,root,755)
8f462252 153%attr(755,root,root) %{_sbindir}/iptaccount
edb92c36 154%attr(755,root,root) %{_libdir}/xtables/libxt_*.so
8f462252 155%attr(755,root,root) %{_libdir}/libxt_ACCOUNT_cl.so.*
8af0bca6 156%{_mandir}/man8/xtables-addons.8*
7ad03426 157%endif
64731849 158
7ad03426 159%if %{with kernel}
64731849
TP
160%files -n kernel%{_alt_kernel}-net-xtables-addons
161%defattr(644,root,root,755)
84556dc6 162/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
edb92c36 163/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz
7ad03426 164%endif
This page took 0.07658 seconds and 4 git commands to generate.