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
|
2021-08-22 02:16:43 +02:00
|
|
|
version=1.17
|
2018-03-30 00:20:00 +02:00
|
|
|
release=1
|
2021-08-28 18:58:29 +02:00
|
|
|
source=(https://golang.org/dl/go${version}.src.tar.gz \
|
|
|
|
https://golang.org/dl/go${version}.linux-amd64.tar.gz)
|
2016-05-26 01:02:42 +02:00
|
|
|
|
|
|
|
unpack_source() {
|
2021-08-28 18:58:29 +02:00
|
|
|
install -d $SRC/go${version}
|
|
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.linux-amd64.tar.gz \
|
|
|
|
-C $SRC/go${version} --strip-components=1
|
|
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.src.tar.gz \
|
2016-05-26 01:02:42 +02:00
|
|
|
-C $SRC
|
|
|
|
}
|
2014-02-11 16:25:20 +01:00
|
|
|
|
|
|
|
build() {
|
2021-08-28 18:58:29 +02:00
|
|
|
export GOCACHE=$SRC/go-build
|
|
|
|
export GOROOT_BOOTSTRAP=$SRC/go${version}
|
2014-02-11 16:25:20 +01:00
|
|
|
export GOROOT_FINAL=/usr/lib/go
|
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
cd go/src
|
2021-08-28 18:58:29 +02:00
|
|
|
./make.bash
|
2018-08-28 18:41:28 +02:00
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
install -d $PKG/usr/lib
|
2021-08-28 18:58:29 +02:00
|
|
|
mv $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 "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
|
|
|
|
rm $PKG/usr/lib/go/src/*.bat
|
2014-02-11 16:25:20 +01:00
|
|
|
}
|