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