blob: b76a0beb071c7245d7dbafbb52bc5d655ea74cac (
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.9.1
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 $name-certpath.diff)
11
12 unpack_source() {
13 install -d $SRC/go1.4
14 bsdtar -xf $PKGMK_SOURCE_DIR/${name}1.4.3.linux-amd64.tar.gz \
15 -C $SRC/go1.4 --strip-components 1
16 bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz \
17 -C $SRC
18 cp $name-certpath.diff $SRC
19 }
20
21 build() {
22 export GOROOT_BOOTSTRAP=${SRC}/go1.4
23 export GOROOT_FINAL=/usr/lib/go
24 export GOOS=linux
25 export GOARCH=amd64
26
27 patch -p0 -i $SRC/$name-certpath.diff
28
29 cd go/src
30 bash make.bash --no-clean
31
32 install -d $PKG/usr/lib
33 cp -r $SRC/go $PKG/usr/lib/
34
35 install -d $PKG/usr/bin
36 ln -s /usr/lib/go/bin/go $PKG/usr/bin/
37 ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
38
39 find $PKG \( -name "*.a" -o -name "*.go" \) -exec chmod 644 '{}' \;
40 find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
41 rm $PKG/usr/lib/go/src/*.bat
42 }
|