2007-01-04 01:56:28 +01:00
|
|
|
#
|
2011-05-31 13:02:21 +02:00
|
|
|
# spec file for package iptables
|
2007-01-04 01:56:28 +01:00
|
|
|
#
|
2012-01-01 00:51:26 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-04 01:56:28 +01:00
|
|
|
#
|
2008-09-13 02:35:11 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
|
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
Name: iptables
|
2011-12-31 23:59:05 +01:00
|
|
|
%define lname_ipq libipq0
|
|
|
|
%define lname_iptc libiptc0
|
|
|
|
%define lname_xt libxtables7
|
2012-01-02 22:32:31 +01:00
|
|
|
Version: 1.4.12.90
|
2011-12-31 23:59:05 +01:00
|
|
|
Release: 1
|
|
|
|
Summary: IP Packet Filter Administration utilities
|
2011-12-28 11:12:23 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Security
|
2011-12-31 23:59:05 +01:00
|
|
|
|
|
|
|
Url: http://netfilter.org/
|
2011-07-22 15:17:36 +02:00
|
|
|
#DL-URL: ftp://ftp.netfilter.org/pub/iptables/
|
2010-03-07 10:56:32 +01:00
|
|
|
#Git-Web: http://git.netfilter.org/
|
|
|
|
#Git-Clone: git://git.netfilter.org/iptables
|
2011-05-31 13:02:21 +02:00
|
|
|
Source: %name-%version.tar.xz
|
2011-05-30 01:59:50 +02:00
|
|
|
Patch1: iptables-batch.patch
|
2011-12-28 11:12:23 +01:00
|
|
|
Patch2: iptables-apply-mktemp-fix.patch
|
2011-07-26 08:58:08 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-08-01 20:28:45 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-09-05 16:32:05 +02:00
|
|
|
BuildRequires: sgmltool
|
2011-08-01 20:28:45 +02:00
|
|
|
%endif
|
2011-08-01 21:30:40 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?centos_version}
|
2011-09-05 16:32:05 +02:00
|
|
|
BuildRequires: sgml-common
|
2011-08-01 20:28:45 +02:00
|
|
|
%endif
|
2012-01-20 19:07:31 +01:00
|
|
|
BuildRequires: autoconf automake libtool
|
|
|
|
BuildRequires: pkgconfig >= 0.21 xz
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: fdupes pkgconfig(libnfnetlink) >= 1.0.0
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
BuildRequires: libnfnetlink-devel >= 1.0.0
|
|
|
|
%endif
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%description
|
2011-12-31 23:59:05 +01:00
|
|
|
iptables is used to set up, maintain, and inspect the tables of IP
|
2007-01-04 01:56:28 +01:00
|
|
|
packet filter rules in the Linux kernel. This version requires kernel
|
|
|
|
2.4.0 or newer.
|
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%package -n %lname_ipq
|
|
|
|
Summary: Library to interface with the (old) ip_queue kernel mechanism
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname_ipq
|
|
|
|
The Netfilter project provides a mechanism (ip_queue) for passing
|
|
|
|
packets out of the stack for queueing to userspace, then receiving
|
|
|
|
these packets back into the kernel with a verdict specifying what to
|
|
|
|
do with the packets (such as ACCEPT or DROP). These packets may also
|
|
|
|
be modified in userspace prior to reinjection back into the kernel.
|
|
|
|
|
|
|
|
ip_queue/libipq is obsoleted by nf_queue/libnetfilter_queue!
|
|
|
|
|
|
|
|
%package -n libipq-devel
|
|
|
|
Summary: Development files for the ip_queue kernel mechanism
|
2007-01-04 01:56:28 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-12-31 23:59:05 +01:00
|
|
|
Requires: %lname_ipq = %version
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%description -n libipq-devel
|
|
|
|
The Netfilter project provides a mechanism (ip_queue) for passing
|
|
|
|
packets out of the stack for queueing to userspace, then receiving
|
|
|
|
these packets back into the kernel with a verdict specifying what to
|
|
|
|
do with the packets (such as ACCEPT or DROP). These packets may also
|
|
|
|
be modified in userspace prior to reinjection back into the kernel.
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
ip_queue/libipq is obsoleted by nf_queue/libnetfilter_queue!
|
|
|
|
|
|
|
|
%package -n %lname_iptc
|
|
|
|
Summary: Library for low-level ruleset generation and parsing
|
2011-09-05 16:32:05 +02:00
|
|
|
Group: System/Libraries
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%description -n %lname_iptc
|
|
|
|
libiptc ("iptables cache") is used to retrieve from the kernel, parse,
|
|
|
|
construct, and load new rulesets into the kernel.
|
|
|
|
|
|
|
|
%package -n libiptc-devel
|
|
|
|
Summary: Development files for libiptc, a packet filter ruleset library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname_iptc = %version
|
|
|
|
# NOT adding Obsoletes/Provides: iptables-devel, because that one has
|
|
|
|
# been split into _two_ new pkgs (libxtables-devel, libiptc-devel).
|
|
|
|
# NOTE: Please use pkgconfig(...) symbols for BuildRequires.
|
|
|
|
|
|
|
|
%description -n libiptc-devel
|
|
|
|
libiptc ("iptables cache") is used to retrieve from the kernel, parse,
|
|
|
|
construct, and load new rulesets into the kernel.
|
|
|
|
|
|
|
|
%package -n %lname_xt
|
|
|
|
Summary: iptables extension interface
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname_xt
|
|
|
|
This library contains all the iptables code shared between iptables,
|
|
|
|
ip6tables, their extensions, and for external integration for e.g.
|
2011-09-02 12:34:59 +02:00
|
|
|
iproute2's m_xt.
|
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%package -n libxtables-devel
|
|
|
|
Summary: Libraries, Headers and Development Man Pages for iptables
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname_xt = %version
|
|
|
|
|
|
|
|
%description -n libxtables-devel
|
|
|
|
This library contains all the iptables code shared between iptables,
|
|
|
|
ip6tables, their extensions, and for external integration for e.g.
|
|
|
|
|
|
|
|
Link your extension (iptables plugins) with $(pkg-config xtables
|
|
|
|
--libs) and place the plugin in the directory given by $(pkg-config
|
|
|
|
xtables --variable=xtlibdir).
|
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
%prep
|
2011-08-01 20:46:26 +02:00
|
|
|
%if 0%{?__xz:1}
|
2011-07-22 15:17:36 +02:00
|
|
|
%setup -q
|
2011-08-01 20:46:26 +02:00
|
|
|
%else
|
|
|
|
tar -xf "%{S:0}" --use=xz;
|
|
|
|
%setup -DTq
|
|
|
|
%endif
|
2011-09-01 19:13:49 +02:00
|
|
|
%patch -P 1 -p1
|
2011-12-28 11:12:23 +01:00
|
|
|
%patch2 -p1
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%build
|
2010-02-23 01:18:57 +01:00
|
|
|
if [ ! -e configure ]; then
|
|
|
|
./autogen.sh;
|
|
|
|
fi
|
2010-01-03 12:32:20 +01:00
|
|
|
# bnc#561793 - do not include unclean module in iptables manpage
|
2010-10-29 19:58:43 +02:00
|
|
|
rm -f extensions/libipt_unclean.man
|
2011-09-01 19:13:49 +02:00
|
|
|
# includedir is overriden on purpose to detect projects that
|
|
|
|
# fail to include libxtables_CFLAGS
|
|
|
|
%configure --includedir=%_includedir/%name-%version --enable-libipq
|
2010-02-23 01:18:57 +01:00
|
|
|
make %{?_smp_mflags}
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%install
|
2011-05-30 02:02:46 +02:00
|
|
|
make DESTDIR=%buildroot install
|
2009-06-18 01:36:03 +02:00
|
|
|
# iptables-apply is not installed by upstream Makefile
|
2011-06-08 13:07:59 +02:00
|
|
|
install -m0755 iptables/iptables-apply %buildroot%_sbindir/
|
|
|
|
install -m0644 iptables/iptables-apply.8 %buildroot%_mandir/man8/
|
2011-12-31 23:59:05 +01:00
|
|
|
rm -f "%buildroot/%_libdir"/*.la;
|
2011-08-09 22:49:38 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-08-08 21:49:24 +02:00
|
|
|
%fdupes %buildroot
|
2011-08-09 22:49:38 +02:00
|
|
|
%endif
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%post -n %lname_ipq -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %lname_ipq -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n %lname_iptc -p /sbin/ldconfig
|
2009-01-19 02:02:09 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%postun -n %lname_iptc -p /sbin/ldconfig
|
2009-01-19 02:02:09 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%post -n %lname_xt -p /sbin/ldconfig
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%postun -n %lname_xt -p /sbin/ldconfig
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-12-31 23:59:05 +01:00
|
|
|
%doc COPYING
|
2011-06-08 13:07:59 +02:00
|
|
|
%doc %_mandir/man1/*
|
2011-05-30 02:02:46 +02:00
|
|
|
%doc %_mandir/man8/*
|
|
|
|
%_bindir/iptables*
|
|
|
|
%_sbindir/iptables*
|
|
|
|
%_sbindir/ip6tables*
|
|
|
|
%_sbindir/xtables*
|
2011-08-08 21:58:49 +02:00
|
|
|
%_sbindir/nfnl_osf
|
2011-07-22 15:17:36 +02:00
|
|
|
%_libdir/xtables
|
2011-08-08 21:58:49 +02:00
|
|
|
%_datadir/xtables
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%files -n %lname_ipq
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libipq.so.0*
|
|
|
|
|
|
|
|
%files -n libipq-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %_mandir/man3/libipq*
|
|
|
|
%doc %_mandir/man3/ipq*
|
|
|
|
%dir %_includedir/%name-%version
|
|
|
|
%_includedir/%name-%version/libipq*
|
|
|
|
%_libdir/libipq.so
|
|
|
|
%_libdir/pkgconfig/libipq.pc
|
|
|
|
|
|
|
|
%files -n %lname_iptc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libiptc.so.0*
|
|
|
|
%_libdir/libip4tc.so.0*
|
|
|
|
%_libdir/libip6tc.so.0*
|
|
|
|
|
|
|
|
%files -n libiptc-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %_includedir/%name-%version
|
|
|
|
%_includedir/%name-%version/libiptc*
|
|
|
|
%_libdir/libip*tc.so
|
|
|
|
%_libdir/pkgconfig/libip*tc.pc
|
|
|
|
|
|
|
|
%files -n %lname_xt
|
2007-01-04 01:56:28 +01:00
|
|
|
%defattr(-,root,root)
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libxtables.so.7*
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%files -n libxtables-devel
|
2011-09-02 12:34:59 +02:00
|
|
|
%defattr(-,root,root)
|
2011-12-31 23:59:05 +01:00
|
|
|
%dir %_includedir/%name-%version
|
|
|
|
%_includedir/%name-%version/xtables.h
|
|
|
|
%_libdir/libxtables.so
|
|
|
|
%_libdir/pkgconfig/xtables.pc
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2007-03-15 01:40:35 +01:00
|
|
|
%changelog
|