makedeb


go-bin 1.20.1-1


The Go programming language

Click here to go back to the commit logs for go-bin.

Commit:


Hash: bcf5c2b0a708532cb2a248cc3b6c441534b35b9d

Message: Fixed packaging to include all needed files

Diff


diff --git a/.SRCINFO b/.SRCINFO
index d60390d..2568ef8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,11 +3,15 @@ generated-by = makedeb-makepkg
 pkgbase = go-bin
 	pkgdesc = The Go programming language
 	pkgver = 1.17.5
-	pkgrel = 1
+	pkgrel = 2
 	url = https://go.dev/
 	arch = x86_64
+	provides = golang-go
+	provides = gccgo-go
 	conflicts = golang-go
 	conflicts = gccgo-go
+	noextract = go-bin-1.17.5.tar.gz
+	options = !strip
 	source = go-bin-1.17.5.tar.gz::https://go.dev//dl/go1.17.5.linux-amd64.tar.gz
 	sha256sums = SKIP
 
diff --git a/PKGBUILD b/PKGBUILD
index 7ce3593..54c5198 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,25 @@
 # Maintainer: Hunter Wittenborn <hunter@hunterwittenborn.com>
 pkgname=go-bin
 pkgver=1.17.5
-pkgrel=1
+pkgrel=2
 pkgdesc="The Go programming language"
 arch=('x86_64')
 conflicts=('golang-go' 'gccgo-go')
+provides=('golang-go' 'gccgo-go')
+options=('!strip')
+noextract=("${pkgname}-${pkgver}.tar.gz")
 url="https://go.dev/"
 
 source=("${pkgname}-${pkgver}.tar.gz::${url}/dl/go${pkgver}.linux-amd64.tar.gz")
 sha256sums=('SKIP')
 
 package() {
-    cd go/bin/
-    install -Dm 755 ./go "${pkgdir}/usr/bin/go"
-    install -Dm 755 ./gofmt "${pkgdir}/usr/bin/gofmt"
+    mkdir -p "${pkgdir}/usr/local/"
+    tar -C "${pkgdir}/usr/local/" -xzf "./${pkgname}-${pkgver}.tar.gz"
+    
+    mkdir -p "${pkgdir}/usr/bin/"
+    for i in 'go' 'gofmt'; do
+        ln -s "/usr/local/go/bin/${i}" "${pkgdir}/usr/bin/${i}"
+        chmod 755 "${pkgdir}/usr/local/go/bin/${i}"
+    done
 }