blob: 6ebb6a8c9ca5ba784cf4456afeb8972141dfc67e (
plain)
1 # Description: The Go Programming Language
2 # URL: https://go.dev/
3 # Maintainer: Matt Housh, jaeger at crux dot ninja
4
5 name=go
6 version=1.19.5
7 release=1
8 source=(https://golang.org/dl/go${version}.src.tar.gz \
9 https://golang.org/dl/go${version}.linux-amd64.tar.gz)
10
11 unpack_source() {
12 install -d $SRC/go${version}
13 bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.linux-amd64.tar.gz \
14 -C $SRC/go${version} --strip-components=1
15 bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.src.tar.gz \
16 -C $SRC
17 }
18
19 build() {
20 export GOCACHE=$SRC/go-build
21 export GOROOT_BOOTSTRAP=$SRC/go${version}
22 export GOROOT_FINAL=/usr/lib/go
23
24 cd go/src
25 ./make.bash
26
27 install -d $PKG/usr/lib
28 mv $SRC/go $PKG/usr/lib/
29
30 install -d $PKG/usr/bin
31 ln -s /usr/lib/go/bin/go $PKG/usr/bin/
32 ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
33
34 find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
35 rm $PKG/usr/lib/go/src/*.bat
36 }
|