1# 2# Copyright (C) 2011-2012 OpenWrt.org 3# 4# This is free software, licensed under the GNU General Public License v2. 5# See /LICENSE for more information. 6# 7 8include $(TOPDIR)/rules.mk 9 10PKG_NAME:=libmnl 11PKG_VERSION:=1.0.3 12PKG_RELEASE:=2 13 14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 15PKG_SOURCE_URL:= \ 16 http://www.netfilter.org/projects/libmnl/files \ 17 ftp://ftp.netfilter.org/pub/libmnl 18PKG_MD5SUM:=7d95fc3bea3365bc03c48e484224f65f 19 20PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org> 21 22PKG_FIXUP:=autoreconf 23PKG_INSTALL:=1 24PKG_LICENSE:=LGPL-2.1+ 25 26include $(INCLUDE_DIR)/package.mk 27 28define Package/libmnl 29 SECTION:=libs 30 CATEGORY:=Libraries 31 TITLE:=Minimalistic user-space library for Netlink 32 URL:=http://www.netfilter.org/projects/libmnl/ 33endef 34 35define Package/libmnl/description 36 libmnl is a minimalistic user-space library oriented to Netlink developers. 37 There are a lot of common tasks in parsing, validating, constructing of 38 both the Netlink header and TLVs that are repetitive and easy to get wrong. 39 This library aims to provide simple helpers that allows you to re-use code 40 and to avoid re-inventing the wheel. The main features of this library are: 41 . 42 * Small: the shared library requires around 30KB for an x86-based computer. 43 . 44 * Simple: this library avoids complexity and elaborated abstractions that 45 tend to hide Netlink details. 46 . 47 * Easy to use: the library simplifies the work for Netlink-wise developers. 48 It provides functions to make socket handling, message building, validating, 49 parsing and sequence tracking, easier. 50 . 51 * Easy to re-use: you can use the library to build your own abstraction layer 52 on top of this library. 53 . 54 * Decoupling: the interdependency of the main bricks that compose the library 55 is reduced, i.e. the library provides many helpers, but the programmer is not 56 forced to use them. 57endef 58 59CONFIGURE_ARGS+= \ 60 --enable-shared \ 61 --enable-static \ 62 63define Build/InstallDev 64 $(INSTALL_DIR) $(1)/usr/include 65 $(CP) $(PKG_INSTALL_DIR)/usr/include/libmnl $(1)/usr/include/ 66 $(INSTALL_DIR) $(1)/usr/lib 67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.{a,so*} $(1)/usr/lib/ 68 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmnl.pc $(1)/usr/lib/pkgconfig/ 70endef 71 72define Package/libmnl/install 73 $(INSTALL_DIR) $(1)/usr/lib 74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.so.* $(1)/usr/lib/ 75endef 76 77$(eval $(call BuildPackage,libmnl)) 78