From 3d38ed8991b6454f35f3ab3dcdb7040c3816a09154c691ce66fe3638ce5b805b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 9 Dec 2019 09:40:03 +0000 Subject: [PATCH] - Add json, python [boo#1158723] OBS-URL: https://build.opensuse.org/package/show/security:netfilter/nftables?expand=0&rev=45 --- nftables.changes | 5 +++++ nftables.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/nftables.changes b/nftables.changes index 6e26c92..18f5551 100644 --- a/nftables.changes +++ b/nftables.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 9 09:39:52 UTC 2019 - Jan Engelhardt + +- Add json, python [boo#1158723] + ------------------------------------------------------------------- Tue Dec 3 09:09:28 UTC 2019 - Jan Engelhardt diff --git a/nftables.spec b/nftables.spec index 99ce9b8..e00a857 100644 --- a/nftables.spec +++ b/nftables.spec @@ -32,7 +32,9 @@ BuildRequires: bison BuildRequires: flex BuildRequires: gmp-devel BuildRequires: pkg-config >= 0.21 +BuildRequires: python3-base BuildRequires: readline-devel +BuildRequires: pkgconfig(jansson) BuildRequires: pkgconfig(libmnl) >= 1.0.3 BuildRequires: pkgconfig(libnftnl) >= 1.1.4 BuildRequires: pkgconfig(xtables) >= 1.6.1 @@ -67,6 +69,13 @@ library. This package contains the header files for the library. +%package -n python3-nftables +Summary: Python interface for nftables +Group: Development/Languages/Python + +%description -n python3-nftables +A Python module for nftables. + %prep %setup -q @@ -78,7 +87,8 @@ mkdir obj pushd obj/ %define _configure ../configure %configure --disable-silent-rules --disable-static --docdir="%_docdir/%name" \ - --includedir="%_includedir/%name" --disable-python + --includedir="%_includedir/%name" --with-json \ + --enable-python --with-python-bin="$(which python3)" make %{?_smp_mflags} popd @@ -93,7 +103,6 @@ mv "$b/%_sysconfdir/nftables"/* "$b/%_docdir/%name/examples/" %postun -n libnftables1 -p /sbin/ldconfig %files -%defattr(-,root,root) %license COPYING %_sbindir/nft %_mandir/man5/*.5* @@ -109,4 +118,7 @@ mv "$b/%_sysconfdir/nftables"/* "$b/%_docdir/%name/examples/" %_libdir/pkgconfig/*.pc %_mandir/man3/*.3* +%files -n python3-nftables +%python3_sitelib/nftables* + %changelog