diff options
Diffstat (limited to 'repos/extra/go/abuild')
| -rw-r--r-- | repos/extra/go/abuild | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/repos/extra/go/abuild b/repos/extra/go/abuild new file mode 100644 index 00000000..fb3185b1 --- /dev/null +++ b/repos/extra/go/abuild @@ -0,0 +1,28 @@ +name=go +version=1.23.4 +release=1 +source="https://${name}lang.org/dl/${name}${version}.src.tar.gz + https://golang.org/dl/go${version}.linux-amd64.tar.gz::noextract" + +build() { + if [ ! "$(which go)" ]; then + mkdir $SRC/gobin + tar xf $SRC/go${version}.linux-amd64.tar.gz -C $SRC/gobin + export GOROOT_BOOTSTRAP=$SRC/gobin/go + else + export GOROOT_BOOTSTRAP=/usr/lib/go + fi + + export GOCACHE=$SRC/.go + export GOROOT_FINAL=/usr/lib/go + + cd src + ./make.bash + + install -d $PKG/usr/lib + mv $SRC/go $PKG/usr/lib/ + + 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/ +} |