forked from pool/ipset
ipset 6.10
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ipset?expand=0&rev=1
This commit is contained in:
146
ipset.spec
Normal file
146
ipset.spec
Normal file
@@ -0,0 +1,146 @@
|
||||
#
|
||||
# spec file for package ipset
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
Name: ipset
|
||||
%define lname libipset1
|
||||
Version: 6.10
|
||||
Release: 0
|
||||
Group: Productivity/Networking/Security
|
||||
Summary: Netfilter ipset administration utility
|
||||
License: GPL-2.0
|
||||
URL: http://ipset.netfilter.org/
|
||||
|
||||
Source: %name-%version.tar.xz
|
||||
Source3: %name-preamble
|
||||
Patch1: 0001-056b0ea-process-include-libipset.diff
|
||||
Patch2: 0002-ab0ef6a-include-libipset-nfproto-h.diff
|
||||
Patch3: 0003-a1a72ef-install-libipset-linux-ip.diff
|
||||
Patch4: 0004-install-libipset-right-place.diff
|
||||
Patch5: no-static.diff
|
||||
#Git-Clone: git://git.netfilter.org/ipset
|
||||
#Git-Web: http://git.netfilter.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf, automake, libtool
|
||||
BuildRequires: pkgconfig >= 0.23, pkgconfig(libmnl) >= 1, xz
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: %kernel_module_package_buildreqs
|
||||
BuildRequires: kernel-syms >= 2.6.39
|
||||
Recommends: %name-kmp
|
||||
%endif
|
||||
|
||||
%kernel_module_package -p %name-preamble
|
||||
|
||||
%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
|
||||
Group: System/Kernel
|
||||
Summary: Netfilter ipset kernel modules
|
||||
|
||||
%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
|
||||
Summary: Userspace library for the in-kernel Netfilter ipset interface
|
||||
Group: System/Libraries
|
||||
|
||||
%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
|
||||
Summary: Development files for ipset extensions
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%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
|
||||
%setup -q
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
||||
|
||||
%build
|
||||
if [ ! -e configure ]; then
|
||||
./autogen.sh;
|
||||
fi;
|
||||
pushd ../;
|
||||
for flavor in %flavors_to_build; do
|
||||
cp -a "%name-%version" "%name-$flavor-%version";
|
||||
pushd "%name-$flavor-%version/";
|
||||
# ksource: it just checks for a header
|
||||
%configure --disable-static \
|
||||
--with-kbuild="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
||||
--with-ksource="/usr/src/linux";
|
||||
make %{?_smp_mflags} all modules;
|
||||
popd;
|
||||
done;
|
||||
|
||||
%install
|
||||
b="%buildroot";
|
||||
pushd ../;
|
||||
for flavor in %flavors_to_build; do
|
||||
pushd "%name-$flavor-%version/";
|
||||
make %{?_smp_mflags} install modules_install \
|
||||
DESTDIR="$b" INSTALL_MOD_PATH="$b";
|
||||
popd;
|
||||
done;
|
||||
rm -f "$b/%_libdir"/*.la;
|
||||
|
||||
%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)
|
||||
%_libdir/libipset.so.1*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%_libdir/libipset.so
|
||||
%_includedir/libipset
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user