From e5732facd106fc1f32b3571de7eeb669db572e37 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 30 Mar 2014 14:35:52 +0200 Subject: libcoap: add new package This patch adds the libcoap implementation [0]. The most common use of this library is to use it with contiki os. That's one reason why the current buildsystem isn't "well". The added patches replace the current buildsystem with a better one. The replacement had the goal to made less changes to the current libcoap implementation. The libcoap implementation do a include of autoconf "config.h" header file in the API headers. The patches adds a new libcoap_config.h with a LIBCOAP_ prefix to all defines and replace the use of these defines in the API headers. That's too not well but offers a workaround to make a clean install of this library and other autotools software can use it. I found in the current release some things which are broken like some disable features in configure call and others things which are not well. I don't fix it in the patches, I will try to send the fixes to the maintainer of this project and hopefully it's fixed in the next release. Libcoap is still the best known C implementation of the coap protocol, but also it's a bleeding edge implementation of a draft [1]. [0] http://sourceforge.net/projects/libcoap/ [1] http://tools.ietf.org/html/draft-ietf-core-coap-18 Signed-off-by: Alexander Aring [mol: simplify first patch] Signed-off-by: Michael Olbrich --- rules/libcoap.make | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 rules/libcoap.make (limited to 'rules/libcoap.make') diff --git a/rules/libcoap.make b/rules/libcoap.make new file mode 100644 index 000000000..9292ced0f --- /dev/null +++ b/rules/libcoap.make @@ -0,0 +1,66 @@ +# -*-makefile-*- +# +# Copyright (C) 2014 by Alexander Aring +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_LIBCOAP) += libcoap + +# +# Paths and names +# +LIBCOAP_VERSION := 4.1.1 +LIBCOAP_MD5 := 2ab6daf1f187f02d25b77c39c2ecc56b +LIBCOAP := libcoap-$(LIBCOAP_VERSION) +LIBCOAP_SUFFIX := tar.gz +LIBCOAP_URL := $(call ptx/mirror, SF, libcoap/$(LIBCOAP).$(LIBCOAP_SUFFIX)) +LIBCOAP_SOURCE := $(SRCDIR)/$(LIBCOAP).$(LIBCOAP_SUFFIX) +LIBCOAP_DIR := $(BUILDDIR)/$(LIBCOAP) +LIBCOAP_LICENSE := BSD, GPLv2 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +LIBCOAP_CONF_TOOL := autoconf +LIBCOAP_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --enable-shared \ + --disable-static \ + --disable-debug \ + --enable-async \ + --enable-block \ + --enable-observe \ + --enable-query-filter \ + --with-max-pdu-size=10240 + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/libcoap.targetinstall: + @$(call targetinfo) + + @$(call install_init, libcoap) + @$(call install_fixup, libcoap,PRIORITY,optional) + @$(call install_fixup, libcoap,SECTION,base) + @$(call install_fixup, libcoap,AUTHOR,"Alexander Aring ") + @$(call install_fixup, libcoap,DESCRIPTION,missing) + + @$(call install_lib, libcoap, 0, 0, 0644, libcoap) + + @$(call install_copy, libcoap, 0, 0, 0755, -, /usr/bin/coap-server) + @$(call install_copy, libcoap, 0, 0, 0755, -, /usr/bin/coap-client) + + @$(call install_finish, libcoap) + + @$(call touch) + +# vim: syntax=make -- cgit v1.2.3