blob: efea3fab742f94fb0f5cd4814568792952ecdd4d [file] [log] [blame]
Andrew Geisslerd5838332022-05-27 11:33:10 -05001SUMMARY = "A C implementation of the Constrained Application Protocol"
2DESCRIPTION = "libcoap implements a lightweight application-protocol for \
3devices that are constrained their resources such as computing power, \
4RF range, memory, bandwith, or network packet sizes."
5HOMEPAGE ="https://libcoap.net/"
6
7LICENSE = "BSD-2-Clause & BSD-1-Clause"
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008LIC_FILES_CHKSUM = "file://LICENSE;md5=0fbe4435d52b2d27a16f980ffc8ffc80"
Andrew Geisslerd5838332022-05-27 11:33:10 -05009
10SRC_URI = "git://github.com/obgm/libcoap.git;branch=main;protocol=https \
Andrew Geisslerd5838332022-05-27 11:33:10 -050011 file://run-ptest \
12 "
Andrew Geissler87f5cff2022-09-30 13:13:31 -050013SRCREV = "02b76470ab9168947152c78ad50835bf043d7c84"
Andrew Geisslerd5838332022-05-27 11:33:10 -050014
15S = "${WORKDIR}/git"
16
17inherit autotools manpages pkgconfig ptest
18
Andrew Geissler8f840682023-07-21 09:09:43 -050019DEPENDS += "ctags-native"
20
Andrew Geisslerd5838332022-05-27 11:33:10 -050021PACKAGECONFIG ?= "\
22 async openssl tcp \
23 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
24"
25PACKAGECONFIG[async] = "--enable-async,--disable-async"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050026PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls,,,openssl mbedtls"
Andrew Geisslerd5838332022-05-27 11:33:10 -050027PACKAGECONFIG[manpages] = "--enable-documentation --enable-doxygen --enable-manpages,--disable-documentation,asciidoc-native doxygen-native graphviz-native"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050028PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,,,gnutls openssl"
29PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,,,gnutls mbedtls"
Andrew Geisslerd5838332022-05-27 11:33:10 -050030PACKAGECONFIG[small-stack] = "--enable-small-stack,--disable-small-stack"
31PACKAGECONFIG[tcp] = "--enable-tcp,--disable-tcp"
32PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,cunit"
33
34EXTRA_OECONF = "\
35 --with-epoll --enable-add-default-names \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050036 --without-tinydtls --without-submodule-tinydtls \
Andrew Geisslerd5838332022-05-27 11:33:10 -050037 ${@bb.utils.contains_any('PACKAGECONFIG', 'gnutls openssl mbedtls', '--enable-dtls', '--disable-dtls', d)} \
38"
39
40python () {
41 if d.getVar('PTEST_ENABLED') == "1":
42 d.setVar('DISABLE_STATIC', '')
43}
44
45export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/catalog"
46
Andrew Geissler8f840682023-07-21 09:09:43 -050047do_compile:prepend() {
48 oe_runmake update-map-file
49}
50
Andrew Geisslerd5838332022-05-27 11:33:10 -050051do_install_ptest () {
52 install -d ${D}${PTEST_PATH}
53 install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
54 install -m 0755 ${B}/tests/testdriver ${D}${PTEST_PATH}/testdriver
55}
56
57PACKAGE_BEFORE_PN += "\
58 ${PN}-bin \
59"
60
61FILES:${PN}-bin = "${bindir}"
62FILES:${PN}-dev += "${datadir}/${BPN}/examples"