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 <raj.k...@gmail.com>
---
 meta/classes/godep.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta/classes/godep.bbclass

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 )
+}
+
-- 
2.16.2

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to