RobertBerger

Untitled

Apr 6th, 2021
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. # custom do_compile:
  2. # 1. only fetch
  3. # 2. fix permissions of pkg/mod/xxx directories
  4. # 3. modifed version of do_compile, taken from bbclass
  5. do_compile() {
  6. # let's try not to build, but just download the stuff
  7. # go -d does not build, but just download
  8. ${GO} get -d github.com/influxdata/telegraf/cmd/telegraf
  9.  
  10. # --> fix permissions
  11. if [ -d ${B}/pkg/mod ]; then
  12. find ${B}/pkg/mod -depth -type d -name go.opencensus.io* -exec chmod -R 755 {} \;
  13. find ${B}/pkg/mod -depth -type d -name collectd.org* -exec chmod -R 755 {} \;
  14. find ${B}/pkg/mod -depth -type d -name go.starlark.net* -exec chmod -R 755 {} \;
  15. find ${B}/pkg/mod -depth -type d -name modernc.org* -exec chmod -R 755 {} \;
  16. find ${B}/pkg/mod -depth -type d -name k8s.io* -exec chmod -R 755 {} \;
  17. find ${B}/pkg/mod -depth -type d -name cloud.google.com -exec chmod -R 755 {} \;
  18. find ${B}/pkg/mod -depth -type d -name code.cloudfoundry.org -exec chmod -R 755 {} \;
  19. find ${B}/pkg/mod -depth -type d -name github.com -exec chmod -R 755 {} \;
  20. find ${B}/pkg/mod -depth -type d -name golang.org -exec chmod -R 755 {} \;
  21. find ${B}/pkg/mod -depth -type d -name golang.zx2c4.com -exec chmod -R 755 {} \;
  22. find ${B}/pkg/mod -depth -type d -name google.golang.org -exec chmod -R 755 {} \;
  23. find ${B}/pkg/mod -depth -type d -name gopkg.in -exec chmod -R 755 {} \;
  24. fi
  25. # <-- fix permissions
  26.  
  27. # --> this is a modified version of do_compile from the bbclass
  28. export TMPDIR="${GOTMPDIR}"
  29. if [ -n "${GO_INSTALL}" ]; then
  30. if [ -n "${GO_LINKSHARED}" ]; then
  31. ${GO} install ${GOBUILDFLAGS} github.com/influxdata/telegraf/cmd/telegraf
  32. rm -rf ${B}/bin
  33. fi
  34. ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} github.com/influxdata/telegraf/cmd/telegraf
  35. fi
  36. # <-- this is a modified version of do_compile from the bbclass
  37. }
  38.  
Add Comment
Please, Sign In to add comment