2016-05-26 01:02:42 +02:00
|
|
|
# Description: The Go Programming Language
|
|
|
|
# URL: https://golang.org/
|
|
|
|
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
2014-02-11 16:25:20 +01:00
|
|
|
|
|
|
|
name=go
|
2020-02-21 00:26:54 +01:00
|
|
|
version=1.13.8
|
2018-03-30 00:20:00 +02:00
|
|
|
release=1
|
2016-12-17 07:41:17 +01:00
|
|
|
source=(https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz \
|
2019-10-18 04:55:18 +02:00
|
|
|
https://storage.googleapis.com/golang/${name}${version}.src.tar.gz)
|
2016-05-26 01:02:42 +02:00
|
|
|
|
|
|
|
unpack_source() {
|
2016-12-17 07:41:17 +01:00
|
|
|
install -d $SRC/go1.4
|
|
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/${name}1.4.3.linux-amd64.tar.gz \
|
|
|
|
-C $SRC/go1.4 --strip-components 1
|
2016-05-26 01:02:42 +02:00
|
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz \
|
|
|
|
-C $SRC
|
|
|
|
}
|
2014-02-11 16:25:20 +01:00
|
|
|
|
|
|
|
build() {
|
2016-12-17 07:41:17 +01:00
|
|
|
export GOROOT_BOOTSTRAP=${SRC}/go1.4
|
2014-02-11 16:25:20 +01:00
|
|
|
export GOROOT_FINAL=/usr/lib/go
|
2016-05-26 01:02:42 +02:00
|
|
|
export GOOS=linux
|
|
|
|
export GOARCH=amd64
|
2018-02-22 20:56:45 +01:00
|
|
|
export GOCACHE=off
|
2014-02-11 16:25:20 +01:00
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
cd go/src
|
|
|
|
bash make.bash --no-clean
|
2014-02-11 16:25:20 +01:00
|
|
|
|
2018-08-28 18:41:28 +02:00
|
|
|
rm -rf $SRC/go/pkg/obj/go-build/*
|
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
install -d $PKG/usr/lib
|
|
|
|
cp -r $SRC/go $PKG/usr/lib/
|
2014-02-11 16:25:20 +01:00
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
install -d $PKG/usr/bin
|
|
|
|
ln -s /usr/lib/go/bin/go $PKG/usr/bin/
|
|
|
|
ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
|
2016-08-19 01:40:55 +02:00
|
|
|
|
2016-12-17 07:41:17 +01:00
|
|
|
find $PKG \( -name "*.a" -o -name "*.go" \) -exec chmod 644 '{}' \;
|
|
|
|
find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
|
|
|
|
rm $PKG/usr/lib/go/src/*.bat
|
2014-02-11 16:25:20 +01:00
|
|
|
}
|