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