]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- initial upgrade to 1.13
[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
2741a7bf 22#
3e68c602 23%define rel 0.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
3e68c602 31Version: 1.13
64731849 32Release: %{rel}
2741a7bf 33License: GPL
64731849 34Group: Networking/Admin
564b72e7 35Source0: http://dl.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2
3e68c602 36# Source0-md5: 7c9cd60a00c2d4b9bed76cf4cec22fa1
564b72e7 37URL: http://xtables-addons.sourceforge.net/
7ad03426 38Patch0: %{name}-libs.patch
da544e81 39Patch1: %{name}-geoip-dbpath.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
0330c995 45BuildRequires: rpmbuild(macros) >= 1.379
3e68c602 46Requires: iptables >= 1.4.3
2741a7bf
AM
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50An extensible NAT system, and an extensible packet filtering system.
51Replacement of ipchains in 2.6 and higher kernels.
52
53%description -l pl.UTF-8
54Wydajny system translacji adresów (NAT) oraz system filtrowania
55pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych.
56
57%description -l pt_BR.UTF-8
58Esta é a ferramenta que controla o código de filtragem de pacotes do
59kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode
60configurar filtros de pacotes, NAT, mascaramento (masquerading),
61regras dinâmicas (stateful inspection), etc.
62
63%description -l ru.UTF-8
64xtables-addons управляют кодом фильтрации сетевых пакетов в ядре
65Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и
66IP маскарадинг, и т.п.
67
68%description -l uk.UTF-8
69xtables-addons управляють кодом фільтрації пакетів мережі в ядрі
70Linux. Вони дозволяють вам встановлювати міжмережеві екрани
71(firewalls) та IP маскарадинг, тощо.
72
64731849
TP
73%package -n kernel%{_alt_kernel}-net-xtables-addons
74Summary: -
75Summary(pl.UTF-8): -
76Release: %{release}@%{_kernel_ver_str}
77Group: Base/Kernel
78Requires: %{name} = %{version}-%{rel}
79%{?with_dist_kernel:%requires_releq_kernel}
80Requires(post,postun): /sbin/depmod
81
82%description -n kernel%{_alt_kernel}-net-xtables-addons
83
2741a7bf
AM
84%prep
85%setup -q
7ad03426 86%patch0 -p1
da544e81 87%patch1 -p1
2741a7bf 88
564b72e7 89%{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig
90
2741a7bf 91%build
011c75bf
KK
92%{__libtoolize}
93%{__aclocal}
94%{__autoconf}
95%{__automake}
2741a7bf 96%configure \
2659fab6 97 --with-kbuild=%{_kernelsrcdir} \
2741a7bf 98 --with-ksource=%{_kernelsrcdir}
84556dc6 99
8bb72a08 100export XA_TOPSRCDIR=$PWD
7ad03426 101
102%if %{with kernel}
8bb72a08 103%build_kernel_modules -C extensions -m compat_xtables
7ad03426 104%endif
105
106%if %{with userspace}
84556dc6 107%{__make} -C extensions
7ad03426 108%endif
2741a7bf
AM
109
110%install
111rm -rf $RPM_BUILD_ROOT
f0af06f8 112install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
2741a7bf 113
7ad03426 114%if %{with kernel}
84556dc6
PS
115cd extensions
116%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
117install xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 118cd ..
7ad03426 119%endif
84556dc6 120
7ad03426 121%if %{with userspace}
84556dc6
PS
122%{__make} -C extensions install \
123 DESTDIR=$RPM_BUILD_ROOT
84556dc6
PS
124
125cd extensions
126for m in $(cat .manpages.lst); do
127 install libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8
128done
129cd ..
7ad03426 130%endif
2741a7bf
AM
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
64731849 135%post -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 136%depmod %{_kernel_ver}
137
64731849 138%postun -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 139%depmod %{_kernel_ver}
140
64731849 141%if %{with userspace}
2741a7bf
AM
142%files
143%defattr(644,root,root,755)
0330c995 144%attr(755,root,root) %{_libdir}/xtables/libxt_CHAOS.so
145%attr(755,root,root) %{_libdir}/xtables/libxt_DELUDE.so
84556dc6 146%attr(755,root,root) %{_libdir}/xtables/libxt_DHCPADDR.so
0330c995 147%attr(755,root,root) %{_libdir}/xtables/libxt_IPMARK.so
148%attr(755,root,root) %{_libdir}/xtables/libxt_LOGMARK.so
84556dc6 149%attr(755,root,root) %{_libdir}/xtables/libxt_SYSRQ.so
0330c995 150%attr(755,root,root) %{_libdir}/xtables/libxt_TARPIT.so
151%attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so
152%attr(755,root,root) %{_libdir}/xtables/libxt_condition.so
84556dc6
PS
153%attr(755,root,root) %{_libdir}/xtables/libxt_dhcpaddr.so
154%attr(755,root,root) %{_libdir}/xtables/libxt_fuzzy.so
0330c995 155%attr(755,root,root) %{_libdir}/xtables/libxt_geoip.so
156%attr(755,root,root) %{_libdir}/xtables/libxt_ipp2p.so
564b72e7 157%attr(755,root,root) %{_libdir}/xtables/libxt_lscan.so
84556dc6 158%attr(755,root,root) %{_libdir}/xtables/libxt_quota2.so
90ef35fc 159%attr(755,root,root) %{_libdir}/xtables/libxt_length2.so
84556dc6
PS
160%{_mandir}/man8/libxt_CHAOS.*
161%{_mandir}/man8/libxt_DELUDE.*
162%{_mandir}/man8/libxt_DHCPADDR.*
90ef35fc 163%{_mandir}/man8/libxt_ECHO.8
84556dc6
PS
164%{_mandir}/man8/libxt_IPMARK.*
165%{_mandir}/man8/libxt_LOGMARK.*
166%{_mandir}/man8/libxt_SYSRQ.*
167%{_mandir}/man8/libxt_TARPIT.*
90ef35fc 168%{_mandir}/man8/libxt_TEE.8*
84556dc6
PS
169%{_mandir}/man8/libxt_condition.*
170%{_mandir}/man8/libxt_dhcpaddr.*
171%{_mandir}/man8/libxt_fuzzy.*
172%{_mandir}/man8/libxt_geoip.*
173%{_mandir}/man8/libxt_ipp2p.*
564b72e7 174%{_mandir}/man8/libxt_lscan.*
84556dc6 175%{_mandir}/man8/libxt_quota2.*
90ef35fc 176%{_mandir}/man8/libxt_length.8*
7ad03426 177%endif
64731849 178
7ad03426 179%if %{with kernel}
64731849
TP
180%files -n kernel%{_alt_kernel}-net-xtables-addons
181%defattr(644,root,root,755)
84556dc6
PS
182/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
183/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_CHAOS.ko.gz
184/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DELUDE.ko.gz
185/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DHCPADDR.ko.gz
186/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_IPMARK.ko.gz
187/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_LOGMARK.ko.gz
188/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_SYSRQ.ko.gz
189/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TARPIT.ko.gz
190/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TEE.ko.gz
191/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_condition.ko.gz
192/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_fuzzy.ko.gz
193/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_geoip.ko.gz
194/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_ipp2p.ko.gz
564b72e7 195/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_lscan.ko.gz
84556dc6 196/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_quota2.ko.gz
90ef35fc 197/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_length2.ko.gz
7ad03426 198%endif
This page took 0.105136 seconds and 4 git commands to generate.