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