From: Khem Raj Date: Sat, 3 Mar 2018 16:34:37 +0000 (-0800) Subject: godep.bbclass: Add helper class to enable go-dep tool X-Git-Tag: uninative-1.8~108 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=9bea8313b0dd5a6af08d15ee8634fe2ef9ee0f75;p=openembedded-core.git godep.bbclass: Add helper class to enable go-dep tool Many go packages can take advantage of dep tool since they manage their own dependencies, this class helps in using go dep tool for such packages Signed-off-by: Khem Raj Signed-off-by: Ross Burton --- diff --git a/meta/classes/godep.bbclass b/meta/classes/godep.bbclass new file mode 100644 index 0000000000..c82401c313 --- /dev/null +++ b/meta/classes/godep.bbclass @@ -0,0 +1,8 @@ +DEPENDS_append = " go-dep-native" + +do_compile_prepend() { + rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml + rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock + ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure ) +} +