Skip to contentSkip to conversation

libcoap: new package

PATCH New Joris Lijssens 2 participants 2 messages May 30, 2016 – Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libcoap: new package

---
Changes v1 -> v2:
- Fix typo in libcoap.mk

 package/Config.in            |  1 +
 package/libcoap/Config.in    | 10 ++++++++++
 package/libcoap/libcoap.hash |  2 ++
 package/libcoap/libcoap.mk   | 21 +++++++++++++++++++++
 4 files changed, 34 insertions(+)
 create mode 100644 package/libcoap/Config.in
 create mode 100644 package/libcoap/libcoap.hash
 create mode 100644 package/libcoap/libcoap.mk
package/Config.in +1 -0
index 9d668bf..db78939 100644
@@ -1122,6 +1122,7 @@ menu "Networking"
 	source "package/ibrdtn/Config.in"
 	source "package/libcgi/Config.in"
 	source "package/libcgicc/Config.in"
+	source "package/libcoap/Config.in"
 	source "package/libcurl/Config.in"
 	source "package/libdnet/Config.in"
 	source "package/libeXosip2/Config.in"
package/libcoap/Config.in new file +10 -0
new file mode 100644
index 0000000..7aea348
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBCOAP
+	bool "libcoap"
+	help
+	 libcoap is a C implementation of a lightweight application-protocol
+	 for devices that are constrained their resources such as computing
+	 power, RF range, memory, bandwith, or network packet sizes. This
+	 protocol, CoAP, is standardized by the IETF as RFC 7252. For further
+	 information related to CoAP, see <http://coap.technology>.
+
+	 https://github.com/obgm/libcoap
package/libcoap/libcoap.hash new file +2 -0
new file mode 100644
index 0000000..dce491b
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 f66e91742c2b027fcd7c575d8e7b53d79d3624aad1b3baba481dd88f6e2bc44d libcoap-c909bf802034b7762a2182848304b2530e58444f.tar.gz
package/libcoap/libcoap.mk new file +21 -0
new file mode 100644
index 0000000..320582f
@@ -0,0 +1,21 @@
+################################################################################
+#
+# libcoap
+#
+################################################################################
+
+LIBCOAP_VERSION = c909bf802034b7762a2182848304b2530e58444f
+LIBCOAP_SITE = $(call github,obgm,libcoap,$(LIBCOAP_VERSION))
+LIBCOAP_INSTALL_STAGING = YES
+LIBCOAP_LICENSE = GPLv2, BSD-2c
+LIBCOAP_LICENSE_FILES = LICENSE.GPL LICENSE.BSD
+LIBCOAP_CONF_OPTS += --with-shared --disable-examples
+
+# This package uses autoconf, but not automake, so we need to call
+# their special autogen.sh script.
+define LIBCOAP_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+LIBCOAP_PRE_CONFIGURE_HOOKS += LIBCOAP_RUN_AUTOGEN
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v2 1/1 libcoap: new package

Hello,

Quoted 4 lines · Joris Lijssens

---
Changes v1 -> v2:
- Fix typo in libcoap.mk

I've applied the patch, after doing quite a few changes:

[Thomas:
- Adjust license: it is "GPLv2+ or BSD-2c" and not "GPLv2, BSD-2c"
- Add the COPYING file to the license files, since it indicates explictly that the license is GPLv2+ or BSD-2c.
- Remove the --with-shared configure options, which doesn't exist.
- Use LIBCOAP_AUTORECONF = YES instead of calling the autogen.sh script manually.
- Add patch to fix build with old gcc versions.]

Thanks for your contribution!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com