diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-03-03 08:34:37 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:43:10 -0800 |
commit | 160e7b0875279b05140255f67b8fbb1d8ebd3aee (patch) | |
tree | 760af6497207ee6c69a217263e2f60dbd158712c /meta/classes/godep.bbclass | |
parent | c0d18587054642eaa9ae1981f900c187763a9519 (diff) | |
download | poky-160e7b0875279b05140255f67b8fbb1d8ebd3aee.tar.gz |
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
(From OE-Core rev: 9bea8313b0dd5a6af08d15ee8634fe2ef9ee0f75)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/godep.bbclass')
-rw-r--r-- | meta/classes/godep.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ | |||
1 | DEPENDS_append = " go-dep-native" | ||
2 | |||
3 | do_compile_prepend() { | ||
4 | rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml | ||
5 | rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock | ||
6 | ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure ) | ||
7 | } | ||
8 | |||