2014-01-20 23:17:08 +01:00
|
|
|
#
|
|
|
|
# spec file for package libnftables
|
|
|
|
#
|
|
|
|
# Copyright (c) 2012 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: libnftnl
|
|
|
|
%define lname libnftnl0
|
2014-01-20 23:29:38 +01:00
|
|
|
Version: 1.0.0+git1
|
2014-01-20 23:17:08 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Userspace library to access the nftables Netlink interface
|
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
URL: http://netfilter.org/projects/libnftnl/
|
|
|
|
|
|
|
|
#Git-Snapshot: libnftnl-1.0.0-1-g91264d8
|
|
|
|
#Git-Clone: git://git.netfilter.org/libnftnl
|
|
|
|
Source: %name-%version.tar.xz
|
2014-01-21 00:54:09 +01:00
|
|
|
Source2: baselibs.conf
|
|
|
|
Patch1: 0001-build-resolve-build-failure-involving-linux-netlink..patch
|
|
|
|
Patch2: 0002-build-resolve-compile-error-involving-XT_EXTENSION_M.patch
|
2014-01-20 23:17:08 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: pkgconfig >= 0.21
|
2014-01-21 00:43:53 +01:00
|
|
|
BuildRequires: libmnl-devel >= 1.0.3
|
2014-01-21 00:44:29 +01:00
|
|
|
BuildRequires: xz
|
2014-01-21 00:38:33 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
%define with_json 1
|
|
|
|
%define with_mxml 1
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version}
|
|
|
|
%define with_json 1
|
|
|
|
%endif
|
|
|
|
%if 0%{?with_json}
|
|
|
|
BuildRequires: pkgconfig(jansson) >= 2.3
|
|
|
|
%endif
|
|
|
|
%if 0%{?with_mxml}
|
2014-01-20 23:17:08 +01:00
|
|
|
BuildRequires: pkgconfig(mxml) >= 2.6
|
2014-01-21 00:36:37 +01:00
|
|
|
%endif
|
2014-01-20 23:17:08 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
libnftnl is a userspace library providing a low-level netlink
|
|
|
|
programming interface (API) to the in-kernel nf_tables subsystem.
|
|
|
|
|
|
|
|
%package -n %lname
|
|
|
|
Summary: Userspace library to access the nftables Netlink interface
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
libnftnl is a userspace library providing a low-level netlink
|
|
|
|
programming interface (API) to the in-kernel nf_tables subsystem.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Requires: %lname = %version
|
|
|
|
Summary: Development files to libnftnl
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
libnftnl is a userspace library providing a low-level netlink
|
|
|
|
programming interface (API) to the in-kernel nf_tables subsystem.
|
|
|
|
|
|
|
|
This subpackage contains libraries and header files for developing
|
|
|
|
applications that want to make use of libnftnl.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qn %name
|
2014-01-21 00:54:09 +01:00
|
|
|
%patch -P 1 -P 2 -p1
|
2014-01-20 23:17:08 +01:00
|
|
|
|
|
|
|
%build
|
2014-01-21 00:38:33 +01:00
|
|
|
%configure \
|
|
|
|
%if 0%{?with_mxml}
|
2014-01-21 00:36:37 +01:00
|
|
|
--with-xml-parsing \
|
|
|
|
%endif
|
2014-01-21 00:38:33 +01:00
|
|
|
%if 0%{?with_json}
|
|
|
|
--with-json-parsing \
|
|
|
|
%endif
|
|
|
|
--includedir="%_includedir/pkg"
|
2014-01-20 23:17:08 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR="%buildroot";
|
|
|
|
rm -f "%buildroot/%_libdir"/*.la;
|
|
|
|
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libnftnl.so.0*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_includedir/pkg/
|
|
|
|
%_libdir/libnftnl.so
|
|
|
|
%_libdir/pkgconfig/libnftnl.pc
|
2014-01-20 23:35:25 +01:00
|
|
|
%doc COPYING
|
2014-01-20 23:17:08 +01:00
|
|
|
|
|
|
|
%changelog
|