-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
Makefile
99 lines (79 loc) · 2.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libcoap
PKG_VERSION:=4.3.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=1a195adacd6188d3b71c476e7b21706fef7f3663ab1fb138652e8da49a9ec556
PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later BSD-2-Clause
PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
PKG_CPE_ID:=cpe:/a:libcoap:libcoap
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libcoap
SECTION:=libs
CATEGORY:=Libraries
TITLE:=CoAP (RFC 7252) library
URL:=https://libcoap.net/
ABI_VERSION:=3
endef
define Package/libcoap/description
Constrained Application Protocol (RFC 7252) library
endef
define Package/coap-client
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libcoap
TITLE:=CoAP (RFC 7252) client tool
endef
define Package/coap-client/description
Constrained Application Protocol (RFC7252) client tool
endef
define Package/coap-server
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libcoap
TITLE:=CoAP (RFC 7252) server programs
endef
define Package/coap-server/description
Constrained Application Protocol (RFC 7252) server and resource directory server
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-examples \
--disable-documentation \
--disable-doxygen \
--disable-dtls \
--disable-gcov \
--disable-tests
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef
define Package/libcoap/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION)*.so* $(1)/usr/lib/
endef
define Package/coap-client/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-client $(1)/usr/bin/
endef
define Package/coap-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-server $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-rd $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libcoap))
$(eval $(call BuildPackage,coap-client))
$(eval $(call BuildPackage,coap-server))