From a92f8c42788fa07da48e1b7dd32e62ee10d0e521 Mon Sep 17 00:00:00 2001 From: kyak Date: Wed, 6 Jul 2011 12:35:48 +0400 Subject: [PATCH] libnl-1: initial port --- libnl-1/Makefile | 44 +++++++++++++++++++ .../dont-link-libnl-from-sysroot.patch | 26 +++++++++++ 2 files changed, 70 insertions(+) create mode 100644 libnl-1/Makefile create mode 100644 libnl-1/patches/dont-link-libnl-from-sysroot.patch diff --git a/libnl-1/Makefile b/libnl-1/Makefile new file mode 100644 index 0000000..efcf58a --- /dev/null +++ b/libnl-1/Makefile @@ -0,0 +1,44 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnl-1 +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=libnl-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.infradead.org/~tgr/libnl/files +PKG_MD5SUM:=ae970ccd9144e132b68664f98e7ceeb1 +PKG_INSTALL:=1 + +PKG_BUILD_DIR=$(BUILD_DIR)/libnl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libnl-1 + TITLE:=library for applications dealing with netlink sockets + SECTION:=libs + CATEGORY:=Libraries + URL:=http://www.infradead.org/~tgr/libnl/ +endef + +define Package/libnl-1/description +libnl is a library for applications dealing with netlink sockets. +The library provides an interface for raw netlink messaging and +various netlink family specific interfaces. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include +endef + +define Package/libnl-1/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,libnl-1)) diff --git a/libnl-1/patches/dont-link-libnl-from-sysroot.patch b/libnl-1/patches/dont-link-libnl-from-sysroot.patch new file mode 100644 index 0000000..beb6361 --- /dev/null +++ b/libnl-1/patches/dont-link-libnl-from-sysroot.patch @@ -0,0 +1,26 @@ +Index: libnl-1.1/src/Makefile +=================================================================== +--- libnl-1.1.orig/src/Makefile 2008-01-14 07:48:45.000000000 -0800 ++++ libnl-1.1/src/Makefile 2010-09-22 14:58:46.820826001 -0700 +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] + include ../Makefile.opts + endif + +-LDFLAGS += -L../lib -lnl utils.o ++LDFLAGS += ../lib/libnl.so utils.o + CIN := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c) + TOOLS := $(CIN:%.c=%) + +Index: libnl-1.1/tests/Makefile +=================================================================== +--- libnl-1.1.orig/tests/Makefile 2008-01-14 07:48:45.000000000 -0800 ++++ libnl-1.1/tests/Makefile 2010-09-22 14:58:46.820826001 -0700 +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] + include ../Makefile.opts + endif + +-LDFLAGS += -L../lib -lnl ../src/utils.o ++LDFLAGS += ../lib/libnl.so ../src/utils.o + CIN := $(wildcard test-*.c) + TOOLS := $(CIN:%.c=%) +