procd: update to latest git HEAD
[openwrt/staging/wigyori.git] / package / libs / libnl / Makefile
1 #
2 # Copyright (C) 2006-2013 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:=libnl
11 PKG_VERSION:=3.4.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_4_0
16 PKG_HASH:=b7287637ae71c6db6f89e1422c995f0407ff2fe50cecd61a312b6a9b0921f5bf
17 PKG_LICENSE:=LGPL-2.1
18
19 PKG_INSTALL:=1
20 PKG_FIXUP:=autoreconf
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libnl/default
25 SECTION:=libs
26 CATEGORY:=Libraries
27 URL:=http://www.infradead.org/~tgr/libnl/
28 endef
29
30 define Package/libnl-core
31 $(call Package/libnl/default)
32 TITLE:=Core Netlink Library
33 DEPENDS:=+libpthread
34 endef
35
36 define Package/libnl-genl
37 $(call Package/libnl/default)
38 TITLE:=Generic Netlink Library
39 DEPENDS:=+libnl-core
40 endef
41
42 define Package/libnl-route
43 $(call Package/libnl/default)
44 TITLE:=Routing Netlink Library
45 DEPENDS:=+libnl-core
46 endef
47
48 define Package/libnl-nf
49 $(call Package/libnl/default)
50 TITLE:=Netfilter Netlink Library
51 DEPENDS:=+libnl-route
52 endef
53
54 define Package/libnl
55 $(call Package/libnl/default)
56 TITLE:=Full Netlink Library
57 DEPENDS:=+libnl-genl +libnl-route +libnl-nf
58 endef
59
60 define Package/libnl-core/description
61 Common code for all netlink libraries
62 endef
63
64 define Package/libnl-genl/description
65 Generic Netlink Library Functions
66 endef
67
68 define Package/libnl-route/description
69 Routing Netlink Library Functions
70 endef
71
72 define Package/libnl-nf/description
73 Netfilter Netlink Library Functions
74 endef
75
76 define Package/libnl/description
77 Socket handling, connection management, sending and receiving of data,
78 message construction and parsing, object caching system, etc.
79 endef
80
81 TARGET_CFLAGS += -ffunction-sections -fdata-sections $(FPIC)
82
83 CONFIGURE_ARGS += \
84 --disable-debug
85
86 define Build/InstallDev
87 $(INSTALL_DIR) $(1)/usr/include/libnl3 $(1)/usr/lib/pkgconfig
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl3/
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
91
92 # Copy symlinks
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
97 endef
98
99 define Package/libnl-core/install
100 $(INSTALL_DIR) $(1)/usr/lib
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so* $(1)/usr/lib/
102 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
103 endef
104
105 define Package/libnl-genl/install
106 $(INSTALL_DIR) $(1)/usr/lib
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so* $(1)/usr/lib/
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
109 endef
110
111 define Package/libnl-route/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so* $(1)/usr/lib/
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
115 endef
116
117 define Package/libnl-nf/install
118 $(INSTALL_DIR) $(1)/usr/lib
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so* $(1)/usr/lib/
120 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
121 endef
122
123 define Package/libnl/install
124 :
125 endef
126
127 $(eval $(call BuildPackage,libnl-core))
128 $(eval $(call BuildPackage,libnl-genl))
129 $(eval $(call BuildPackage,libnl-route))
130 $(eval $(call BuildPackage,libnl-nf))
131 $(eval $(call BuildPackage,libnl))