makedeb


go-bin 1.18.2-1


The Go programming language

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for go-bin.

# Maintainer: hiddeninthesand <hiddeninthesand at pm dot me>

# Contributor: Hunter Wittenborn <hunter@hunterwittenborn.com>

pkgname='go-bin'
pkgver='1.18.2'
pkgrel='1'
pkgdesc="The Go programming language"
arch=('x86_64')
conflicts=('golang-go' 'gccgo-go')
provides=("golang-go=${pkgver}" "gccgo-go=${pkgver}")
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=('e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc')

package() {
    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
}