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