blob: 0fc342560aa7dafd7e9729c88bdae0416bb74798 [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
19PACKAGECONFIG ?= "\
20 async openssl tcp \
21 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
22"
23PACKAGECONFIG[async] = "--enable-async,--disable-async"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050024PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls,,,openssl mbedtls"
Andrew Geisslerd5838332022-05-27 11:33:10 -050025PACKAGECONFIG[manpages] = "--enable-documentation --enable-doxygen --enable-manpages,--disable-documentation,asciidoc-native doxygen-native graphviz-native"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050026PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,,,gnutls openssl"
27PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,,,gnutls mbedtls"
Andrew Geisslerd5838332022-05-27 11:33:10 -050028PACKAGECONFIG[small-stack] = "--enable-small-stack,--disable-small-stack"
29PACKAGECONFIG[tcp] = "--enable-tcp,--disable-tcp"
30PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,cunit"
31
32EXTRA_OECONF = "\
33 --with-epoll --enable-add-default-names \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050034 --without-tinydtls --without-submodule-tinydtls \
Andrew Geisslerd5838332022-05-27 11:33:10 -050035 ${@bb.utils.contains_any('PACKAGECONFIG', 'gnutls openssl mbedtls', '--enable-dtls', '--disable-dtls', d)} \
36"
37
38python () {
39 if d.getVar('PTEST_ENABLED') == "1":
40 d.setVar('DISABLE_STATIC', '')
41}
42
43export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/catalog"
44
45do_install_ptest () {
46 install -d ${D}${PTEST_PATH}
47 install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
48 install -m 0755 ${B}/tests/testdriver ${D}${PTEST_PATH}/testdriver
49}
50
51PACKAGE_BEFORE_PN += "\
52 ${PN}-bin \
53"
54
55FILES:${PN}-bin = "${bindir}"
56FILES:${PN}-dev += "${datadir}/${BPN}/examples"