From f6f6f836e7bc211a50190c753278faab950f74bc Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 31 Aug 2017 14:40:00 +0200 Subject: [PATCH 1/2] libcoap: add coap client and server packages Client package adds the CoAP client allowing to communicate with 6LoWPAN devices via the CoAP protocol. Server package adss the CoAP server and the CoAP Resource Directory server. The CoAP server allows to simulate 6LoWPAN devices which can be addressed via the CoAP protocol while the CoAP Resource Directory server can handle resource registrations using the CoAP protocol. Signed-off-by: Hans Dedecker --- libs/libcoap/Makefile | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/libs/libcoap/Makefile b/libs/libcoap/Makefile index ae0130ad44..f777c49252 100644 --- a/libs/libcoap/Makefile +++ b/libs/libcoap/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcoap -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/obgm/libcoap @@ -39,10 +39,32 @@ 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 += \ - --disable-examples \ + --enable-examples \ --disable-documentation ifeq ($(CONFIG_BIG_ENDIAN),y) @@ -62,4 +84,17 @@ define Package/libcoap/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.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)) From d2a273a19d661552e5f4cb1fe7c6c7af069153bf Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 15 Sep 2017 14:41:38 +0200 Subject: [PATCH 2/2] libcoap: update to v4.1.2 Update libcoap to latest stable version 4.1.2 While at it switch from tar extension bz2 to xz Signed-off-by: Hans Dedecker --- libs/libcoap/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/libcoap/Makefile b/libs/libcoap/Makefile index f777c49252..4f49adccf0 100644 --- a/libs/libcoap/Makefile +++ b/libs/libcoap/Makefile @@ -8,14 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcoap -PKG_RELEASE:=4 +PKG_VERSION:=v4.1.2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/obgm/libcoap PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_MIRROR_HASH:=b61fe3245a329dfcf198187149d2072509b18ca6e348d0b423c0f44d11e930e4 +PKG_SOURCE_VERSION:=fa5248603049ddf95cc84608aad569120763bf2b +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=0ab4bc9569a78904743cc3074fd1c0fc9c78c85fd510fef5145dd872523619e6 PKG_MAINTAINER:=Anton Glukhov PKG_LICENSE:=GPL-2.0+ BSD-2-Clause