diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-03-30 14:35:52 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-04-01 08:23:34 +0200 |
commit | e5732facd106fc1f32b3571de7eeb669db572e37 (patch) | |
tree | 76a6fd08212f7f5f466445b9a1f9d21408bcd963 /rules/libcoap.make | |
parent | f582b9b2ff09be600516cc4d7e5e434f6f1b1a67 (diff) | |
download | ptxdist-e5732facd106fc1f32b3571de7eeb669db572e37.tar.gz ptxdist-e5732facd106fc1f32b3571de7eeb669db572e37.tar.xz |
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 <alex.aring@gmail.com>
[mol: simplify first patch]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/libcoap.make')
-rw-r--r-- | rules/libcoap.make | 66 |
1 files changed, 66 insertions, 0 deletions
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 <aar@pengutronix.de> +# +# 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 <aar@pengutronix.de>") + @$(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 |