]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- rebuild for kernel-3.7.6-1
[packages/xtables-addons.git] / xtables-addons.spec
CommitLineData
8bb72a08 1#
e2d21711
JR
2# UPDATE WARNING: xtables-addons 2.0 support only kernels 3.7+
3#
4#
2741a7bf
AM
5# Conditional build:
6%bcond_without dist_kernel # without distribution kernel
64731849 7%bcond_without kernel # don't build kernel modules
16932b07 8%bcond_without userspace # don't build userspace tools
64731849
TP
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
7944b3c3 21%define rel 8
e0de918a 22%define pname xtables-addons
fff03056
JB
23Summary: Additional extensions for xtables packet filtering system
24Summary(pl.UTF-8): Dodatkowe rozszerzenia do systemu filtrowania pakietów xtables
e0de918a 25Name: %{pname}%{_alt_kernel}
0d8b3919 26Version: 1.47.1
64731849 27Release: %{rel}
fff03056 28License: GPL v2
64731849 29Group: Networking/Admin
e0de918a 30Source0: http://downloads.sourceforge.net/xtables-addons/%{pname}-%{version}.tar.xz
0d8b3919 31# Source0-md5: 92b9fc72980f9046622446d451296994
f116ebc0 32Patch0: %{pname}-DNETMAP.patch
60cfc309 33URL: http://xtables-addons.sourceforge.net/
bec39f55 34BuildRequires: autoconf >= 2.65
13dd3c36 35BuildRequires: automake >= 1:1.11
84da2698 36BuildRequires: iptables-devel >= 1.4.5
3fe712a7 37%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.32}
011c75bf 38BuildRequires: libtool
a88a87ac 39BuildRequires: pkgconfig >= 0.9.0
0330c995 40BuildRequires: rpmbuild(macros) >= 1.379
a88a87ac
TP
41BuildRequires: tar >= 1.22
42BuildRequires: xz
84da2698 43Requires: iptables >= 1.4.5
3a1015f9 44Obsoletes: iptables-ipp2p
e0de918a 45BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
2741a7bf 46
bcb7e0a4 47# use macro, so adapter won't try to wrap
028114ac 48%define kpackage kernel%{_alt_kernel}-net-xtables-addons = %{version}-%{rel}@%{_kernel_ver_str}
bcb7e0a4 49
2741a7bf 50%description
fff03056
JB
51xtables-addons is the proclaimed successor to patch-o-matic(-ng). It
52contains extensions that were not accepted in the main
53xtables/iptables package.
2741a7bf 54
fff03056
JB
55For the tools to work, you should install kernel modules, which could
56be found in %{kpackage}.
bcb7e0a4 57
2741a7bf 58%description -l pl.UTF-8
fff03056
JB
59xtables-addons to następca patch-o-matic(-ng). Zawiera rozszerzenia,
60które nie zostały zaakceptowane do głównego pakietu xtables/iptables.
2741a7bf 61
fff03056
JB
62Aby narzędzia działały należy zainstalować moduły jądra, które można
63znaleźć w pakiecie %{kpackage}.
2741a7bf 64
64731849 65%package -n kernel%{_alt_kernel}-net-xtables-addons
bcb7e0a4 66Summary: Kernel modules for xtables addons
fff03056 67Summary(pl.UTF-8): Moudły jądra dla rozszerzeń z pakietu xtables-addons
bcb7e0a4 68Release: %{rel}@%{_kernel_ver_str}
64731849 69Group: Base/Kernel
a3a7bc9c
ER
70# VERSION only dependency is intentional, for allowing multiple kernel pkgs and
71# single userspace package installs.
e0de918a 72Requires: %{pname} = %{version}
bb939eb4
ER
73Suggests: xtables-geoip
74Conflicts: xtables-geoip < 20090901-2
64731849
TP
75%{?with_dist_kernel:%requires_releq_kernel}
76Requires(post,postun): /sbin/depmod
77
78%description -n kernel%{_alt_kernel}-net-xtables-addons
bcb7e0a4 79Kernel modules for xtables addons.
64731849 80
e3c9233c 81%description -n kernel%{_alt_kernel}-net-xtables-addons -l pl.UTF-8
fff03056 82Moduły jądra dla rozszerzeń z pakietu xtables-addons.
e3c9233c 83
2741a7bf 84%prep
69b400ea 85%setup -q -n %{pname}-%{version}
0d8b3919 86%patch0 -p1
2741a7bf
AM
87
88%build
011c75bf
KK
89%{__libtoolize}
90%{__aclocal}
91%{__autoconf}
60cfc309 92%{__autoheader}
011c75bf 93%{__automake}
2741a7bf 94%configure \
83cb19e1 95 --without-kbuild
7ad03426 96
97%if %{with kernel}
8af0bca6 98srcdir=${PWD:-$(pwd)}
8f462252 99%build_kernel_modules V=1 XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables
7ad03426 100%endif
101
102%if %{with userspace}
60cfc309
JB
103%{__make} \
104 V=1
7ad03426 105%endif
2741a7bf
AM
106
107%install
108rm -rf $RPM_BUILD_ROOT
109
7ad03426 110%if %{with kernel}
60cfc309 111install -d $RPM_BUILD_ROOT{/etc/modprobe.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter}
84556dc6 112cd extensions
fcc6dd51 113install iptable_rawpost.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
84556dc6 114%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
fcc6dd51 115install -p {ACCOUNT/,pknock/,}xt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 116cd ..
fd71b2e3 117
fd71b2e3 118cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/xt_sysrq.conf
fff03056 119# Set password at modprobe time. This file is secure if properly guarded,
fd71b2e3
ER
120# i.e only readable by root.
121#options xt_SYSRQ password=cookies
122
123# The hash algorithm can also be specified as a module option, for example, to use SHA-256 instead of the default SHA-1:
124#options xt_SYSRQ hash=sha256
125EOF
60cfc309
JB
126%endif
127
128%if %{with userspace}
129%{__make} -C extensions install \
130 DESTDIR=$RPM_BUILD_ROOT
16932b07
JB
131%{__make} install-man \
132 DESTDIR=$RPM_BUILD_ROOT
60cfc309
JB
133
134%{__rm} $RPM_BUILD_ROOT%{_libdir}/libxt_ACCOUNT_cl.{la,so}
60cfc309 135%endif
fd71b2e3 136
2741a7bf
AM
137%clean
138rm -rf $RPM_BUILD_ROOT
139
a88a87ac 140%post -p /sbin/ldconfig
8f462252
AM
141%postun -p /sbin/ldconfig
142
64731849 143%post -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 144%depmod %{_kernel_ver}
145
64731849 146%postun -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 147%depmod %{_kernel_ver}
148
64731849 149%if %{with userspace}
2741a7bf
AM
150%files
151%defattr(644,root,root,755)
83cb19e1 152%doc README doc/{README.psd,changelog.txt}
8f462252 153%attr(755,root,root) %{_sbindir}/iptaccount
60cfc309
JB
154%attr(755,root,root) %{_libdir}/libxt_ACCOUNT_cl.so.*.*.*
155%attr(755,root,root) %ghost %{_libdir}/libxt_ACCOUNT_cl.so.0
edb92c36 156%attr(755,root,root) %{_libdir}/xtables/libxt_*.so
32aaedb1 157%{_mandir}/man8/iptaccount.8*
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)
60cfc309
JB
164# restricted permissions - may contain password
165%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/xt_sysrq.conf
fcc6dd51 166/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/iptable_rawpost.ko.gz
84556dc6 167/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
edb92c36 168/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz
7ad03426 169%endif
This page took 0.113668 seconds and 4 git commands to generate.