aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/go/abuild
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2025-01-29 01:08:12 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2025-01-29 01:08:12 +0800
commit73fba1e037c5dca5a33efccf7a0a00916cf47909 (patch)
treee3cab8ddcd5d0faa03195ad7dc722142b9eaba67 /repos/extra/go/abuild
parent23f3ba5a2936a9f0581f7ae6e4fdd81eff338087 (diff)
downloadalicelinux-73fba1e037c5dca5a33efccf7a0a00916cf47909.tar.gz
alicelinux-73fba1e037c5dca5a33efccf7a0a00916cf47909.zip
go: new added
Diffstat (limited to 'repos/extra/go/abuild')
-rw-r--r--repos/extra/go/abuild28
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/
+}