1
0
forked from ports/contrib
contrib-tek/go/Pkgfile

42 lines
1.1 KiB
Plaintext
Raw Normal View History

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
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
}
build() {
2016-12-17 00:41:17 -06:00
export GOROOT_BOOTSTRAP=${SRC}/go1.4
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
2016-05-25 18:02:42 -05:00
cd go/src
bash make.bash --no-clean
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/
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
}