blob: c1d6632cc8f2da2cd8fbd0a9565e2fe83a4bbfb3 (
plain)
1 # Description: The Go Programming Language
2 # URL: https://golang.org/
3 # Maintainer: Matt Housh, jaeger at crux dot ninja
4
5 name=go
6 version=1.14.2
7 release=1
8 source=(https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz \
9 https://storage.googleapis.com/golang/${name}${version}.src.tar.gz)
10
11 unpack_source() {
12 install -d $SRC/go1.4
13 bsdtar -xf $PKGMK_SOURCE_DIR/${name}1.4.3.linux-amd64.tar.gz \
14 -C $SRC/go1.4 --strip-components 1
15 bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz \
16 -C $SRC
17 }
18
19 build() {
20 export GOROOT_BOOTSTRAP=${SRC}/go1.4
21 export GOROOT_FINAL=/usr/lib/go
22 export GOOS=linux
23 export GOARCH=amd64
24 export GOCACHE=off
25
26 cd go/src
27 bash make.bash --no-clean
28
29 rm -rf $SRC/go/pkg/obj/go-build/*
30
31 install -d $PKG/usr/lib
32 cp -r $SRC/go $PKG/usr/lib/
33
34 install -d $PKG/usr/bin
35 ln -s /usr/lib/go/bin/go $PKG/usr/bin/
36 ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
37
38 find $PKG \( -name "*.a" -o -name "*.go" \) -exec chmod 644 '{}' \;
39 find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
40 rm $PKG/usr/lib/go/src/*.bat
41 }
|