milis/talimatname/genel/g/go110/talimat

45 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-07-06 11:56:33 +02:00
# Tanım: GO Programlama dili
# URL: http://golang.org/
# Paketçi: milisarge
2018-07-06 11:57:35 +02:00
# Gerekler: git go18
2018-07-06 11:56:33 +02:00
# Grup: geliştirme
2018-07-06 17:15:58 +02:00
isim=go110
2018-07-06 11:56:33 +02:00
surum=1.10.3
devir=1
kaynak=(https://storage.googleapis.com/golang/go$surum.src.tar.gz
default-buildmode-pie.patch)
derle() {
export GOOS=linux
case "$CARCH" in
x86_64) export GOARCH=amd64 ;;
esac
export GOROOT_FINAL=/usr/lib/go
export GOROOT_BOOTSTRAP=/usr/lib/go
export GOCACHE=off
cp -r go go-pie
cd go-pie
patch -p1 -i "$SRC"/default-buildmode-pie.patch
export GOPATH="$SRC/"
for _isim in `echo "go go-pie"`; do
export GOROOT="$SRC/$_isim"
export GOBIN="$GOROOT/bin"
cd "$SRC/$_isim/src"
./make.bash --no-clean -v
PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
PATH="$GOBIN:$PATH" go install -v -race std
done
cd $SRC/go
2018-07-06 16:39:14 +02:00
install -d "$PKG/usr/bin" "$PKG/usr/lib/go-$surum"
cp -a bin pkg src lib misc api "$PKG/usr/lib/go-$surum"
2018-07-06 11:56:33 +02:00
#cp -r doc/* "$PKG/usr/share/doc/go"
2018-07-06 16:39:14 +02:00
ln -sf /usr/lib/go-$surum/bin/go "$PKG/usr/bin/go-$surum"
ln -sf /usr/lib/go-$surum/bin/gofmt "$PKG/usr/bin/gofmt-$surum"
2018-07-06 11:56:33 +02:00
install -Dm644 LICENSE "$PKG/usr/share/licenses/go/LICENSE"
2018-07-06 16:39:14 +02:00
install -Dm644 VERSION "$PKG/usr/lib/go-$surum/VERSION"
rm -rf "$PKG/usr/lib/go-$surum/pkg/bootstrap"
rm -rf "$PKG/usr/lib/go-$surum/pkg/tool/*/api"
2018-07-06 11:56:33 +02:00
}