OSDN Git Service

37835b43387b31d8bb40c70d6d96183b643c1ac2
[immortalwrt/immortalwrt.git] / package / libs / libnftnl / Makefile
1 #
2 # Copyright (C) 2014 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:=libnftnl
11 PKG_VERSION:=1.2.1
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
16 PKG_HASH:=7508a5c414fab13e3cb3ce8262d0ce4f02c1590a8e4f8628ab497b5b4585937c
17
18 PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
19 PKG_LICENSE:=GPL-2.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 DISABLE_NLS:=
28
29 define Package/libnftnl
30   SECTION:=libs
31   CATEGORY:=Libraries
32   DEPENDS:=+libmnl
33   TITLE:=Low-level netlink library for the nf_tables subsystem
34   URL:=http://www.netfilter.org/projects/libnftnl
35   ABI_VERSION:=11
36 endef
37
38 define Package/libnftnl/description
39  libnftnl is a userspace library providing a low-level netlink
40  programming interface (API) to the in-kernel nf_tables subsystem.
41 endef
42
43 TARGET_CFLAGS += $(FPIC) -flto
44 TARGET_LDFLAGS += -flto
45
46 CONFIGURE_ARGS += \
47         --enable-static \
48         --enable-shared
49
50 define Build/InstallDev
51         $(INSTALL_DIR) $(1)/usr/include/libnftnl
52         $(CP) \
53                 $(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
54                 $(1)/usr/include/libnftnl/
55
56         $(INSTALL_DIR) $(1)/usr/lib
57         $(CP) \
58                 $(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
59                 $(1)/usr/lib/
60
61         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
62         $(CP) \
63                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
64                 $(1)/usr/lib/pkgconfig/
65 endef
66
67 define Package/libnftnl/install
68         $(INSTALL_DIR) $(1)/usr/lib
69         $(CP) \
70                 $(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
71                 $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libnftnl))