45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# Tanım: GO Programlama dili
|
||
# URL: http://golang.org/
|
||
# Paketçi: milisarge
|
||
# Gerekler: git go18
|
||
# Grup: geliştirme
|
||
|
||
isim=go10
|
||
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
|
||
install -d "$PKG/usr/bin" "$PKG/usr/lib/go"
|
||
cp -a bin pkg src lib misc api "$PKG/usr/lib/go"
|
||
#cp -r doc/* "$PKG/usr/share/doc/go"
|
||
ln -sf /usr/lib/go/bin/go "$PKG/usr/bin/go"
|
||
ln -sf /usr/lib/go/bin/gofmt "$PKG/usr/bin/gofmt"
|
||
install -Dm644 LICENSE "$PKG/usr/share/licenses/go/LICENSE"
|
||
install -Dm644 VERSION "$PKG/usr/lib/go/VERSION"
|
||
rm -rf "$PKG/usr/lib/go/pkg/bootstrap"
|
||
rm -rf "$PKG/usr/lib/go/pkg/tool/*/api"
|
||
}
|