[packages/nftables] - updated to 0.9.1 (note: new soname) - added python patch, package python bindings

qboosh qboosh at pld-linux.org
Sun Jul 21 19:07:44 CEST 2019


commit cf7ed8508cf5fd7dfe20e40d7239b1b43f9a5fbb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 21 19:09:23 2019 +0200

    - updated to 0.9.1 (note: new soname)
    - added python patch, package python bindings

 nftables-python.patch | 11 +++++++++++
 nftables.spec         | 38 ++++++++++++++++++++++++++++++++++----
 2 files changed, 45 insertions(+), 4 deletions(-)
---
diff --git a/nftables.spec b/nftables.spec
index 8e277a8..77c1fe1 100644
--- a/nftables.spec
+++ b/nftables.spec
@@ -1,12 +1,13 @@
 Summary:	Administration tool for packet filtering and classification
 Summary(pl.UTF-8):	Narzędzie administracyjne do filtrowania i klasyfikacji pakietów
 Name:		nftables
-Version:	0.9.0
-Release:	2
+Version:	0.9.1
+Release:	1
 License:	GPL v2
 Group:		Applications/Networking
 Source0:	https://netfilter.org/projects/nftables/files/%{name}-%{version}.tar.bz2
-# Source0-md5:	d4dcb61df80aa544b2e142e91d937635
+# Source0-md5:	e2facbcad6c5d9bd87a0bf5081a31522
+Patch0:		%{name}-python.patch
 URL:		https://netfilter.org/projects/nftables/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake >= 1.6
@@ -21,7 +22,10 @@ BuildRequires:	libmnl-devel >= 1.0.3
 BuildRequires:	libnftnl-devel >= 1.1.1
 BuildRequires:	libtool
 BuildRequires:	pkgconfig
+BuildRequires:	python-modules >= 1:2.5
 BuildRequires:	readline-devel
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
 Requires:	iptables-libs >= 1.6.1
 Requires:	libmnl >= 1.0.3
 Requires:	libnftnl >= 1.1.1
@@ -69,8 +73,21 @@ Static nftables library.
 %description static -l pl.UTF-8
 Statyczna biblioteka nftables.
 
+%package -n python-nftables
+Summary:	Python bindings for libnftables library
+Summary(pl.UTF-8):	Wiązania Pythona do biblioteki libnftables
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+
+%description -n python-nftables
+Python bindings for libnftables library.
+
+%description -n python-nftables -l pl.UTF-8
+Wiązania Pythona do biblioteki libnftables.
+
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
@@ -95,6 +112,8 @@ rm -rf $RPM_BUILD_ROOT
 # obsoleted by pkg-config
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftables.la
 
+%py_postclean
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -117,8 +136,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-mangle.nft
 %attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-nat.nft
 %attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-raw.nft
+%dir %{_sysconfdir}/nftables/osf
+%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/osf/pf.os
 %attr(755,root,root) %{_libdir}/libnftables.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnftables.so.0
+%attr(755,root,root) %ghost %{_libdir}/libnftables.so.1
+%{_mandir}/man5/libnftables-json.5*
 %{_mandir}/man8/nft.8*
 
 %files devel
@@ -126,7 +148,15 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libnftables.so
 %{_includedir}/nftables
 %{_pkgconfigdir}/libnftables.pc
+%{_mandir}/man3/libnftables.3*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libnftables.a
+
+%files -n python-nftables
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/nftables
+%{py_sitedir}/nftables/*.py[co]
+%{py_sitedir}/nftables/schema.json
+%{py_sitedir}/nftables-0.1-py*.egg-info
diff --git a/nftables-python.patch b/nftables-python.patch
new file mode 100644
index 0000000..11d6ae8
--- /dev/null
+++ b/nftables-python.patch
@@ -0,0 +1,11 @@
+--- nftables-0.9.1/py/Makefile.am.orig	2019-06-24 18:16:08.518253860 +0200
++++ nftables-0.9.1/py/Makefile.am	2019-07-21 18:47:12.550007345 +0200
+@@ -9,7 +9,7 @@
+ install-exec-local:
+ 	cd $(srcdir) && \
+ 		$(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \
+-		install --prefix $(DESTDIR)$(prefix)
++		install --skip-build --root $(DESTDIR) --prefix $(prefix) --optimize=2
+ 
+ uninstall-local:
+ 	rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nftables.git/commitdiff/cf7ed8508cf5fd7dfe20e40d7239b1b43f9a5fbb



More information about the pld-cvs-commit mailing list