SUMMARY = "Go package that augments the standard library "log" package"
HOMEPAGE = "https://github.com/hashicorp/logutils"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b278a92d2c1509760384428817710378"

PKG_NAME = "github.com/hashicorp/logutils"
SRC_URI = "git://${PKG_NAME}.git"
SRCREV = "0dc08b1671f34c4250ce212759ebd880f743d883"

S = "${WORKDIR}/git"

do_install() {
    install -d ${D}${prefix}/local/go/src/${PKG_NAME}
    cp -a ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
}

SYSROOT_PREPROCESS_FUNCS += "logutils_sysroot_preprocess"

logutils_sysroot_preprocess () {
    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
    cp -a ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
}

FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"

Add a bitbake recipe to build logutils
logutils: Add a bitbake recipe to build logutils

Logutils is a go library that augments the standard log package. This
is done in attempt to make "log" more modern in design, while keeping
the same functionallity.

This package is part of the dependency chain needed to build consul.

Signed-off-by: Christopher Braga <ecd7259f54548716af2f59ce4d8c3af5ea2e9f00@windriver.com>
