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
|
2018-01-24 02:11:16 +01:00
|
|
|
version=1.9.3
|
2015-06-23 03:39:05 +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 \
|
2016-05-26 01:02:42 +02:00
|
|
|
https://storage.googleapis.com/golang/${name}${version}.src.tar.gz \
|
|
|
|
$name-certpath.diff)
|
|
|
|
|
|
|
|
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
|
|
|
|
cp $name-certpath.diff $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
|
2014-02-11 16:25:20 +01:00
|
|
|
|
2016-05-26 01:02:42 +02:00
|
|
|
patch -p0 -i $SRC/$name-certpath.diff
|
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
|
|
|
|
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
|
|
|
}
|