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