]> git.pld-linux.org Git - packages/xtables-addons.git/blame - xtables-addons.spec
- release 19
[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
508b64c5 19%define rel 19
fff03056
JB
20Summary: Additional extensions for xtables packet filtering system
21Summary(pl.UTF-8): Dodatkowe rozszerzenia do systemu filtrowania pakietów xtables
2741a7bf 22Name: xtables-addons
cd224199 23Version: 1.39
64731849 24Release: %{rel}
fff03056 25License: GPL v2
64731849 26Group: Networking/Admin
8f462252 27Source0: http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.xz
cd224199 28# Source0-md5: 63dedce9afd16acfd68efc30c9f55950
60cfc309 29URL: http://xtables-addons.sourceforge.net/
bec39f55 30BuildRequires: autoconf >= 2.65
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
16932b07
JB
40%if %{with ipset}
41Provides: ipset = 6.7
0553edd5 42Obsoletes: ipset
16932b07 43%endif
3a1015f9 44Obsoletes: iptables-ipp2p
2741a7bf
AM
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
72Requires: %{name} = %{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
AM
84%prep
85%setup -q
86
16932b07
JB
87%if %{without ipset}
88%{__sed} -i -e 's#build_ipset6=m#build_ipset6=#' mconfig
89%endif
564b72e7 90
2741a7bf 91%build
011c75bf
KK
92%{__libtoolize}
93%{__aclocal}
94%{__autoconf}
60cfc309 95%{__autoheader}
011c75bf 96%{__automake}
2741a7bf 97%configure \
83cb19e1 98 --without-kbuild
7ad03426 99
100%if %{with kernel}
8af0bca6 101srcdir=${PWD:-$(pwd)}
8f462252 102%build_kernel_modules V=1 XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables
7ad03426 103%endif
104
105%if %{with userspace}
60cfc309
JB
106%{__make} \
107 V=1
7ad03426 108%endif
2741a7bf
AM
109
110%install
111rm -rf $RPM_BUILD_ROOT
112
7ad03426 113%if %{with kernel}
60cfc309 114install -d $RPM_BUILD_ROOT{/etc/modprobe.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter}
84556dc6 115cd extensions
fcc6dd51 116install iptable_rawpost.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
84556dc6 117%install_kernel_modules -m compat_xtables -d kernel/net/netfilter
fcc6dd51 118install -p {ACCOUNT/,pknock/,}xt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
84556dc6 119cd ..
fd71b2e3 120
fd71b2e3 121cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/xt_sysrq.conf
fff03056 122# Set password at modprobe time. This file is secure if properly guarded,
fd71b2e3
ER
123# i.e only readable by root.
124#options xt_SYSRQ password=cookies
125
126# The hash algorithm can also be specified as a module option, for example, to use SHA-256 instead of the default SHA-1:
127#options xt_SYSRQ hash=sha256
128EOF
60cfc309
JB
129%endif
130
131%if %{with userspace}
132%{__make} -C extensions install \
133 DESTDIR=$RPM_BUILD_ROOT
16932b07
JB
134%{__make} install-man \
135 DESTDIR=$RPM_BUILD_ROOT
60cfc309
JB
136
137%{__rm} $RPM_BUILD_ROOT%{_libdir}/libxt_ACCOUNT_cl.{la,so}
16932b07
JB
138%if %{with ipset}
139%{__rm} $RPM_BUILD_ROOT%{_libdir}/libipset.{la,so}
140%endif
60cfc309 141%endif
fd71b2e3 142
2741a7bf
AM
143%clean
144rm -rf $RPM_BUILD_ROOT
145
a88a87ac 146%post -p /sbin/ldconfig
8f462252
AM
147%postun -p /sbin/ldconfig
148
64731849 149%post -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 150%depmod %{_kernel_ver}
151
64731849 152%postun -n kernel%{_alt_kernel}-net-xtables-addons
0330c995 153%depmod %{_kernel_ver}
154
64731849 155%if %{with userspace}
2741a7bf
AM
156%files
157%defattr(644,root,root,755)
83cb19e1 158%doc README doc/{README.psd,changelog.txt}
8f462252 159%attr(755,root,root) %{_sbindir}/iptaccount
60cfc309
JB
160%attr(755,root,root) %{_libdir}/libxt_ACCOUNT_cl.so.*.*.*
161%attr(755,root,root) %ghost %{_libdir}/libxt_ACCOUNT_cl.so.0
edb92c36 162%attr(755,root,root) %{_libdir}/xtables/libxt_*.so
32aaedb1 163%{_mandir}/man8/iptaccount.8*
8af0bca6 164%{_mandir}/man8/xtables-addons.8*
16932b07 165%if %{with ipset}
0361a731 166%attr(755,root,root) %{_sbindir}/ipset
16932b07
JB
167%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
168%attr(755,root,root) %ghost %{_libdir}/libipset.so.1
169%{_mandir}/man8/ipset.8*
170%endif
7ad03426 171%endif
64731849 172
7ad03426 173%if %{with kernel}
64731849
TP
174%files -n kernel%{_alt_kernel}-net-xtables-addons
175%defattr(644,root,root,755)
60cfc309
JB
176# restricted permissions - may contain password
177%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/xt_sysrq.conf
fcc6dd51 178/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/iptable_rawpost.ko.gz
84556dc6 179/lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
edb92c36 180/lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz
7ad03426 181%endif
This page took 0.16735 seconds and 4 git commands to generate.