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