talimat 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Tanım: GO Programlama dili
  2. # URL: http://golang.org/
  3. # Paketçi: milisarge
  4. # Gerekler: git go18
  5. # Grup: geliştirme
  6. isim=go110
  7. surum=1.10.3
  8. devir=1
  9. kaynak=(https://storage.googleapis.com/golang/go$surum.src.tar.gz
  10. default-buildmode-pie.patch)
  11. derle() {
  12. export GOOS=linux
  13. case "$CARCH" in
  14. x86_64) export GOARCH=amd64 ;;
  15. esac
  16. export GOROOT_FINAL=/usr/lib/go
  17. export GOROOT_BOOTSTRAP=/usr/lib/go
  18. export GOCACHE=off
  19. cp -r go go-pie
  20. cd go-pie
  21. patch -p1 -i "$SRC"/default-buildmode-pie.patch
  22. export GOPATH="$SRC/"
  23. for _isim in `echo "go go-pie"`; do
  24. export GOROOT="$SRC/$_isim"
  25. export GOBIN="$GOROOT/bin"
  26. cd "$SRC/$_isim/src"
  27. ./make.bash --no-clean -v
  28. PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
  29. PATH="$GOBIN:$PATH" go install -v -race std
  30. done
  31. cd $SRC/go
  32. install -d "$PKG/usr/bin" "$PKG/usr/lib/go-$surum"
  33. cp -a bin pkg src lib misc api "$PKG/usr/lib/go-$surum"
  34. #cp -r doc/* "$PKG/usr/share/doc/go"
  35. ln -sf /usr/lib/go-$surum/bin/go "$PKG/usr/bin/go-$surum"
  36. ln -sf /usr/lib/go-$surum/bin/gofmt "$PKG/usr/bin/gofmt-$surum"
  37. install -Dm644 LICENSE "$PKG/usr/share/licenses/go/LICENSE"
  38. install -Dm644 VERSION "$PKG/usr/lib/go-$surum/VERSION"
  39. rm -rf "$PKG/usr/lib/go-$surum/pkg/bootstrap"
  40. rm -rf "$PKG/usr/lib/go-$surum/pkg/tool/*/api"
  41. }