Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # custom do_compile:
- # 1. only fetch
- # 2. fix permissions of pkg/mod/xxx directories
- # 3. modifed version of do_compile, taken from bbclass
- do_compile() {
- # let's try not to build, but just download the stuff
- # go -d does not build, but just download
- ${GO} get -d github.com/influxdata/telegraf/cmd/telegraf
- # --> fix permissions
- if [ -d ${B}/pkg/mod ]; then
- find ${B}/pkg/mod -depth -type d -name go.opencensus.io* -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name collectd.org* -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name go.starlark.net* -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name modernc.org* -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name k8s.io* -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name cloud.google.com -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name code.cloudfoundry.org -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name github.com -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name golang.org -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name golang.zx2c4.com -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name google.golang.org -exec chmod -R 755 {} \;
- find ${B}/pkg/mod -depth -type d -name gopkg.in -exec chmod -R 755 {} \;
- fi
- # <-- fix permissions
- # --> this is a modified version of do_compile from the bbclass
- export TMPDIR="${GOTMPDIR}"
- if [ -n "${GO_INSTALL}" ]; then
- if [ -n "${GO_LINKSHARED}" ]; then
- ${GO} install ${GOBUILDFLAGS} github.com/influxdata/telegraf/cmd/telegraf
- rm -rf ${B}/bin
- fi
- ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} github.com/influxdata/telegraf/cmd/telegraf
- fi
- # <-- this is a modified version of do_compile from the bbclass
- }
Add Comment
Please, Sign In to add comment