[packages/libnl] - updated to 3.2.23 - added python patch (missing python bindings file taken from git)
qboosh
qboosh at pld-linux.org
Fri Nov 1 07:38:06 CET 2013
commit 85272a9d681d116fd55bdf0b0ec4beae28542aa8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Nov 1 07:38:11 2013 +0100
- updated to 3.2.23
- added python patch (missing python bindings file taken from git)
libnl-python.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
libnl.spec | 21 ++++++++++++++++++---
2 files changed, 62 insertions(+), 3 deletions(-)
---
diff --git a/libnl.spec b/libnl.spec
index 3ec1b02..18e11a6 100644
--- a/libnl.spec
+++ b/libnl.spec
@@ -1,28 +1,32 @@
#
# Conditional build:
%bcond_without apidocs # don't build api docs
+%bcond_without tests # don't perform "make check"
#
Summary: Netlink sockets library
Summary(pl.UTF-8): Biblioteka do obsługi gniazd netlink
Name: libnl
-Version: 3.2.22
+Version: 3.2.23
Release: 1
Epoch: 1
License: LGPL v2.1
Group: Libraries
Source0: http://www.infradead.org/~tgr/libnl/files/%{name}-%{version}.tar.gz
-# Source0-md5: 2e1c889494d274aca24ce5f6a748e66e
+# Source0-md5: 438f8f0a3d46eb90771c9aa2af41590e
Source1: http://www.infradead.org/~tgr/libnl/files/%{name}-doc-%{version}.tar.gz
-# Source1-md5: 99eb05c8a42621fa427fe4e095f95831
+# Source1-md5: 9436f17611c258f27e51f9b37c86fc01
Patch0: %{name}-link.patch
Patch1: %{name}-pedantic.patch
+Patch2: %{name}-python.patch
URL: http://www.infradead.org/~tgr/libnl/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: bison >= 2.4.0
+%{?with_tests:BuildRequires: check >= 0.9.0}
BuildRequires: flex >= 2.5.34
BuildRequires: libtool
BuildRequires: linux-libc-headers >= 6:2.6.23
+BuildRequires: pkgconfig
BuildRequires: python-devel >= 1:2.6
BuildRequires: rpmbuild(macros) >= 1.219
BuildRequires: swig-python
@@ -105,6 +109,7 @@ Pythonowy interfejs do protokołów netlink.
mv -f libnl-doc-%{version} doc
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__libtoolize}
@@ -128,6 +133,8 @@ CFLAGS="%{rpmcflags}" \
LDFLAGS="%{rpmldflags} -L$(pwd)/../lib/.libs" \
%{__python} setup.py build
+%{?with_tests:%{__make} check}
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -168,6 +175,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %ghost %{_libdir}/libnl-cli-3.so.200
%attr(755,root,root) %{_libdir}/libnl-genl-3.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnl-genl-3.so.200
+%attr(755,root,root) %{_libdir}/libnl-idiag-3.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libnl-idiag-3.so.200
%attr(755,root,root) %{_libdir}/libnl-nf-3.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnl-nf-3.so.200
%attr(755,root,root) %{_libdir}/libnl-route-3.so.*.*.*
@@ -188,11 +197,13 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libnl-3.so
%attr(755,root,root) %{_libdir}/libnl-cli-3.so
%attr(755,root,root) %{_libdir}/libnl-genl-3.so
+%attr(755,root,root) %{_libdir}/libnl-idiag-3.so
%attr(755,root,root) %{_libdir}/libnl-nf-3.so
%attr(755,root,root) %{_libdir}/libnl-route-3.so
%{_libdir}/libnl-3.la
%{_libdir}/libnl-cli-3.la
%{_libdir}/libnl-genl-3.la
+%{_libdir}/libnl-idiag-3.la
%{_libdir}/libnl-nf-3.la
%{_libdir}/libnl-route-3.la
%{_includedir}/libnl3
@@ -207,6 +218,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libnl-3.a
%{_libdir}/libnl-cli-3.a
%{_libdir}/libnl-genl-3.a
+%{_libdir}/libnl-idiag-3.a
%{_libdir}/libnl-nf-3.a
%{_libdir}/libnl-route-3.a
@@ -221,6 +233,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{py_sitedir}/netlink
%attr(755,root,root) %{py_sitedir}/netlink/_capi.so
%{py_sitedir}/netlink/*.py[co]
+%dir %{py_sitedir}/netlink/genl
+%attr(755,root,root) %{py_sitedir}/netlink/genl/_capi.so
+%{py_sitedir}/netlink/genl/*.py[co]
%dir %{py_sitedir}/netlink/route
%attr(755,root,root) %{py_sitedir}/netlink/route/_capi.so
%{py_sitedir}/netlink/route/*.py[co]
diff --git a/libnl-python.patch b/libnl-python.patch
new file mode 100644
index 0000000..8e2e38b
--- /dev/null
+++ b/libnl-python.patch
@@ -0,0 +1,44 @@
+--- libnl-3.2.23/python/netlink/utils.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ libnl-3.2.23/python/netlink/utils.h 2013-10-31 22:32:06.022059736 +0100
+@@ -0,0 +1,41 @@
++struct list_head {
++ struct list_head *next;
++};
++
++#define LIST_HEAD(name) \
++ struct list_head name = { &(name) }
++
++static inline int list_empty(const struct list_head *head)
++{
++ return head->next == head;
++}
++
++static inline void list_add(struct list_head *new, struct list_head *head)
++{
++ new->next = head->next;
++ head->next = new;
++}
++
++static inline void list_del(struct list_head *entry, struct list_head *prev)
++{
++ prev->next = entry->next;
++ entry->next = entry;
++}
++
++#define list_for_each_safe(pos, n, head) \
++ for (n = (head), pos = (head)->next; pos != (head); \
++ n = pos, pos = n->next)
++
++#undef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++
++#define container_of(ptr, type, member) ({ \
++ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
++ (type *)( (char *)__mptr - offsetof(type,member) );})
++
++#ifdef DEBUG
++#define pynl_dbg(fmt, ...) \
++ fprintf(stderr, "%s: " fmt, __func__, __VA_ARGS__)
++#else
++#define pynl_dbg(fmt, ...)
++#endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libnl.git/commitdiff/85272a9d681d116fd55bdf0b0ec4beae28542aa8
More information about the pld-cvs-commit
mailing list