2016-05-25 18:02:42 -05:00
|
|
|
# Description: The Go Programming Language
|
|
|
|
# URL: https://golang.org/
|
|
|
|
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
2014-02-12 01:25:20 +10:00
|
|
|
|
|
|
|
name=go
|
2019-10-17 21:55:18 -05:00
|
|
|
version=1.13.3
|
2018-03-29 17:20:00 -05:00
|
|
|
release=1
|
2016-12-17 00:41:17 -06:00
|
|
|
source=(https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz \
|
2019-10-17 21:55:18 -05:00
|
|
|
https://storage.googleapis.com/golang/${name}${version}.src.tar.gz)
|
2016-05-25 18:02:42 -05:00
|
|
|
|
|
|
|
unpack_source() {
|
2016-12-17 00:41:17 -06: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-25 18:02:42 -05:00
|
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz \
|
|
|
|
-C $SRC
|
|
|
|
}
|
2014-02-12 01:25:20 +10:00
|
|
|
|
|
|
|
build() {
|
2016-12-17 00:41:17 -06:00
|
|
|
export GOROOT_BOOTSTRAP=${SRC}/go1.4
|
2014-02-12 01:25:20 +10:00
|
|
|
export GOROOT_FINAL=/usr/lib/go
|
2016-05-25 18:02:42 -05:00
|
|
|
export GOOS=linux
|
|
|
|
export GOARCH=amd64
|
2018-02-22 13:56:45 -06:00
|
|
|
export GOCACHE=off
|
2014-02-12 01:25:20 +10:00
|
|
|
|
2016-05-25 18:02:42 -05:00
|
|
|
cd go/src
|
|
|
|
bash make.bash --no-clean
|
2014-02-12 01:25:20 +10:00
|
|
|
|
2018-08-28 11:41:28 -05:00
|
|
|
rm -rf $SRC/go/pkg/obj/go-build/*
|
|
|
|
|
2016-05-25 18:02:42 -05:00
|
|
|
install -d $PKG/usr/lib
|
|
|
|
cp -r $SRC/go $PKG/usr/lib/
|
2014-02-12 01:25:20 +10:00
|
|
|
|
2016-05-25 18:02:42 -05: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-18 18:40:55 -05:00
|
|
|
|
2016-12-17 00:41:17 -06: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-12 01:25:20 +10:00
|
|
|
}
|