forked from pool/iptables
Jan Engelhardt
da7ecfa1cd
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iptables?expand=0&rev=32
134 lines
3.6 KiB
RPMSpec
134 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package iptables
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: iptables
|
|
License: GPLv2+
|
|
Group: Productivity/Networking/Security
|
|
Version: 1.4.12.1
|
|
Release: 1
|
|
%define xt_sover 7
|
|
Summary: IP Packet Filter Administration
|
|
|
|
#DL-URL: ftp://ftp.netfilter.org/pub/iptables/
|
|
#Git-Web: http://git.netfilter.org/
|
|
#Git-Clone: git://git.netfilter.org/iptables
|
|
Source: %name-%version.tar.xz
|
|
Patch1: iptables-batch.patch
|
|
Url: http://netfilter.org/
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version}
|
|
BuildRequires: sgmltool
|
|
%endif
|
|
%if 0%{?fedora_version} || 0%{?centos_version}
|
|
BuildRequires: sgml-common
|
|
Provides: iptables-ipv6 = %version-%release
|
|
Obsoletes: iptables-ipv6 < %version-%release
|
|
%endif
|
|
BuildRequires: fdupes, libnfnetlink-devel, pkgconfig, xz
|
|
|
|
%description
|
|
Iptables is used to set up, maintain, and inspect the tables of IP
|
|
packet filter rules in the Linux kernel. This version requires kernel
|
|
2.4.0 or newer.
|
|
|
|
%package devel
|
|
Summary: Libraries, Headers and Development Man Pages for iptables
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %name = %version-%release
|
|
Requires: libxtables%xt_sover = %version-%release
|
|
|
|
%description devel
|
|
These libraries are needed to compile
|
|
- additional third-party extensions
|
|
- programs using libipq
|
|
|
|
%package -n libxtables%xt_sover
|
|
Summary: Library for functions shared between iptables
|
|
Group: System/Libraries
|
|
|
|
%description -n libxtables%xt_sover
|
|
This package contains shared functions exposed for integration with
|
|
iproute2's m_xt.
|
|
|
|
%prep
|
|
%if 0%{?__xz:1}
|
|
%setup -q
|
|
%else
|
|
tar -xf "%{S:0}" --use=xz;
|
|
%setup -DTq
|
|
%endif
|
|
%patch -P 1 -p1
|
|
|
|
%build
|
|
if [ ! -e configure ]; then
|
|
./autogen.sh;
|
|
fi
|
|
# bnc#561793 - do not include unclean module in iptables manpage
|
|
rm -f extensions/libipt_unclean.man
|
|
# includedir is overriden on purpose to detect projects that
|
|
# fail to include libxtables_CFLAGS
|
|
%configure --includedir=%_includedir/%name-%version --enable-libipq
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%buildroot install
|
|
# iptables-apply is not installed by upstream Makefile
|
|
install -m0755 iptables/iptables-apply %buildroot%_sbindir/
|
|
install -m0644 iptables/iptables-apply.8 %buildroot%_mandir/man8/
|
|
find "%buildroot" -iname "*.la" -delete
|
|
%if 0%{?suse_version}
|
|
%fdupes %buildroot
|
|
%endif
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%post -n libxtables%xt_sover -p /sbin/ldconfig
|
|
|
|
%postun -n libxtables%xt_sover -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc COPYING INCOMPATIBILITIES
|
|
%doc %_mandir/man1/*
|
|
%doc %_mandir/man8/*
|
|
%_bindir/iptables*
|
|
%_sbindir/iptables*
|
|
%_sbindir/ip6tables*
|
|
%_sbindir/xtables*
|
|
%_sbindir/nfnl_osf
|
|
%_libdir/xtables
|
|
%_libdir/libip*.so.*
|
|
%_datadir/xtables
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc %_mandir/man3/*
|
|
%_includedir/*
|
|
%_libdir/*.so
|
|
%_libdir/pkgconfig/*.pc
|
|
|
|
%files -n libxtables%xt_sover
|
|
%defattr(-,root,root)
|
|
%_libdir/libxtables.so.*
|
|
|
|
%changelog
|