2011-12-31 00:31:51 +01:00
|
|
|
#
|
|
|
|
# spec file for package ipset
|
|
|
|
#
|
2013-03-06 00:30:11 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-12-31 00:31:51 +01: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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-01-20 19:00:13 +01:00
|
|
|
|
2011-12-31 00:31:51 +01:00
|
|
|
Name: ipset
|
2012-06-30 21:19:08 +02:00
|
|
|
%define lname libipset3
|
2013-10-20 15:17:58 +02:00
|
|
|
Version: 6.20
|
2011-12-31 00:31:51 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Netfilter ipset administration utility
|
|
|
|
License: GPL-2.0
|
2012-05-10 13:16:38 +02:00
|
|
|
Group: Productivity/Networking/Security
|
2012-01-20 19:00:13 +01:00
|
|
|
Url: http://ipset.netfilter.org/
|
2011-12-31 00:31:51 +01:00
|
|
|
|
2012-12-21 02:47:32 +01:00
|
|
|
#Freecode-URL: http://freecode.com/projects/ipset/
|
2013-05-10 22:27:09 +02:00
|
|
|
#DL-URL: ftp://ftp.netfilter.org/pub/ipset/ipset-6.19.tar.bz2
|
2011-12-31 00:31:51 +01:00
|
|
|
#Git-Clone: git://git.netfilter.org/ipset
|
|
|
|
#Git-Web: http://git.netfilter.org/
|
2012-01-01 04:39:22 +01:00
|
|
|
Source: %name-%version.tar.xz
|
|
|
|
Source3: %name-preamble
|
2013-10-20 15:17:58 +02:00
|
|
|
Patch1: 0001-build-fix-incorrect-library-versioning.patch
|
2012-01-01 04:39:22 +01:00
|
|
|
|
2011-12-31 00:31:51 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-10-20 15:17:58 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
2012-05-10 13:16:38 +02:00
|
|
|
BuildRequires: pkgconfig >= 0.21
|
|
|
|
BuildRequires: xz
|
2012-06-30 21:19:08 +02:00
|
|
|
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
|
2012-05-10 13:16:38 +02:00
|
|
|
BuildRequires: pkgconfig(libmnl) >= 1
|
2012-06-30 21:19:08 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: libmnl-devel >= 1
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1140
|
|
|
|
BuildRequires: linux-glibc-devel >= 2.6.24
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
BuildRequires: linux-kernel-headers >= 2.6.24
|
|
|
|
%endif
|
|
|
|
%if 0%{?redhat_version} || 0%{?centos_version} || 0%{?fedora_version}
|
2012-11-21 23:58:21 +01:00
|
|
|
BuildRequires: kernel-headers >= 2.6.24
|
2012-06-30 21:19:08 +02:00
|
|
|
%endif
|
2011-12-31 00:31:51 +01:00
|
|
|
%if 0%{?suse_version}
|
2012-06-30 21:19:08 +02:00
|
|
|
# Make quilt happy
|
|
|
|
%if 0%{?kernel_module_package_buildreqs:1}
|
|
|
|
%define with_kmp 1
|
2011-12-31 00:31:51 +01:00
|
|
|
BuildRequires: %kernel_module_package_buildreqs
|
2012-06-30 21:19:08 +02:00
|
|
|
%endif
|
2012-01-20 19:00:13 +01:00
|
|
|
BuildRequires: kernel-syms >= 2.6.39
|
2011-12-31 00:31:51 +01:00
|
|
|
Recommends: %name-kmp
|
|
|
|
%endif
|
|
|
|
|
2012-06-30 21:19:08 +02:00
|
|
|
%if 0%{?with_kmp:1}
|
2011-12-31 00:31:51 +01:00
|
|
|
%kernel_module_package -p %name-preamble
|
2012-06-30 21:19:08 +02:00
|
|
|
%endif
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
IP sets are a framework inside the Linux kernel, which can be
|
|
|
|
administered by the ipset utility. Depending on the type, currently
|
|
|
|
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
|
|
|
|
addresses with MAC addresses in a way, which ensures lightning speed
|
|
|
|
when matching an entry against a set.
|
|
|
|
|
|
|
|
ipset can:
|
|
|
|
* store multiple IP addresses or port numbers and match against the
|
|
|
|
collection by iptables at one swoop;
|
|
|
|
* dynamically update iptables rules against IP addresses or ports
|
|
|
|
without performance penalty;
|
|
|
|
* express complex IP address and ports based rulesets with one single
|
|
|
|
iptables rule and benefit from the speed of IP sets
|
|
|
|
|
|
|
|
%package KMP
|
|
|
|
Summary: Netfilter ipset kernel modules
|
2012-05-10 13:16:38 +02:00
|
|
|
Group: System/Kernel
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%description KMP
|
|
|
|
IP sets are a framework inside the Linux kernel, which can be
|
|
|
|
administered by the ipset utility. Depending on the type, currently
|
|
|
|
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
|
|
|
|
addresses with MAC addresses in a way, which ensures lightning speed
|
|
|
|
when matching an entry against a set.
|
|
|
|
|
|
|
|
This package contains a version update to the in-kernel ipset modules.
|
|
|
|
|
|
|
|
%package -n %lname
|
2012-01-20 19:00:13 +01:00
|
|
|
Summary: Userspace library for the in-kernel Netfilter ipset interface
|
|
|
|
Group: System/Libraries
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
IP sets are a framework inside the Linux kernel, which can be
|
|
|
|
administered by the ipset utility. Depending on the type, currently
|
|
|
|
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
|
|
|
|
addresses with MAC addresses in a way, which ensures lightning speed
|
|
|
|
when matching an entry against a set.
|
|
|
|
|
|
|
|
%package devel
|
2012-01-20 19:00:13 +01:00
|
|
|
Summary: Development files for ipset extensions
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname = %version
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
IP sets are a framework inside the Linux kernel, which can be
|
|
|
|
administered by the ipset utility. Depending on the type, currently
|
|
|
|
an IP set may store IP addresses, (TCP/UDP) port numbers or IP
|
|
|
|
addresses with MAC addresses in a way, which ensures lightning speed
|
|
|
|
when matching an entry against a set.
|
|
|
|
|
|
|
|
%prep
|
2012-06-30 21:19:08 +02:00
|
|
|
%if 0%{?__xz:1}
|
2011-12-31 00:31:51 +01:00
|
|
|
%setup -q
|
2012-06-30 21:19:08 +02:00
|
|
|
%else
|
|
|
|
tar --use=xz -xf "%{S:0}";
|
|
|
|
%setup -DTq
|
|
|
|
%endif
|
2012-11-27 13:54:19 +01:00
|
|
|
%patch -P 1 -p1
|
2013-10-20 15:17:58 +02:00
|
|
|
autoreconf -fi
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%build
|
2012-06-30 21:19:08 +02:00
|
|
|
%if 0%{?with_kmp}
|
2011-12-31 00:31:51 +01:00
|
|
|
for flavor in %flavors_to_build; do
|
2012-05-10 19:33:06 +02:00
|
|
|
cp -a . "../%name-$flavor-%version";
|
|
|
|
pushd "../%name-$flavor-%version/";
|
2011-12-31 00:31:51 +01:00
|
|
|
# ksource: it just checks for a header
|
|
|
|
%configure --disable-static \
|
|
|
|
--with-kbuild="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
2013-10-20 15:17:58 +02:00
|
|
|
--with-ksource="/usr/src/linux" \
|
|
|
|
--includedir="%_includedir/pkg"
|
2011-12-31 00:31:51 +01:00
|
|
|
make %{?_smp_mflags} all modules;
|
|
|
|
popd;
|
|
|
|
done;
|
2012-06-30 21:19:08 +02:00
|
|
|
%else
|
2013-10-20 15:17:58 +02:00
|
|
|
%configure --disable-static --with-kmod=no --includedir="%_includedir/pkg"
|
2012-06-30 21:19:08 +02:00
|
|
|
make %{?_smp_mflags};
|
|
|
|
%endif
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
b="%buildroot";
|
2012-06-30 21:19:08 +02:00
|
|
|
%if 0%{?with_kmp}
|
2011-12-31 00:31:51 +01:00
|
|
|
for flavor in %flavors_to_build; do
|
2012-05-10 19:33:06 +02:00
|
|
|
pushd "../%name-$flavor-%version/";
|
2011-12-31 00:31:51 +01:00
|
|
|
make %{?_smp_mflags} install modules_install \
|
|
|
|
DESTDIR="$b" INSTALL_MOD_PATH="$b";
|
|
|
|
popd;
|
|
|
|
done;
|
2012-06-30 21:19:08 +02:00
|
|
|
%else
|
|
|
|
make %{?_smp_mflags} install DESTDIR="$b";
|
|
|
|
%endif
|
2012-05-10 13:16:38 +02:00
|
|
|
find "$b/%_libdir" -type f -name "*.la" -delete;
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_sbindir/ipset
|
|
|
|
%_mandir/man*/*
|
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
2012-06-30 21:19:08 +02:00
|
|
|
%_libdir/libipset.so.3*
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libipset.so
|
2013-10-20 15:17:58 +02:00
|
|
|
%_libdir/pkgconfig/libipset.pc
|
|
|
|
%_includedir/pkg/
|
2011-12-31 00:31:51 +01:00
|
|
|
|
|
|
|
%changelog
|