# Maintainer: kpcyrd # Maintainer: Caleb Maclennan # Contributor: NOGISAKA Sadata # Contributor: Bennett Piater pkgname=doctl pkgver=1.95.0 pkgrel=1 pkgdesc='The official command line interface for the DigitalOcean API' url='https://github.com/digitalocean/doctl' arch=('x86_64') license=('Apache') depends=('glibc') makedepends=('go') source=(https://github.com/digitalocean/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) sha512sums=('2b1d4d6c2e63d880cfb6c8ffa712c510ea598b2b0d1c085e6ab32fe3faf9f7a8fe40116cb30e56d0d8f88ce28ce46c0f8412d06cff90722f422db02fe3a4ac45') b2sums=('fd7f6e7fb650b1b265672dab2d4762cffbd44c5deadcf4a3e544ac1bcc33fdd5ac0d6f4c3a8f3a2f387946d4340c84ea692d18d6b095df7d375e1d9bd97af245') build() { cd ${pkgname}-${pkgver} go build \ -trimpath \ -buildmode=pie \ -mod=readonly \ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ ./cmd/... } package() { cd ${pkgname}-${pkgver} install -Dm 755 "${pkgname}" -t "${pkgdir}/usr/bin" # setup completions install -dm 755 "${pkgdir}/usr/share/bash-completion/completions" \ "${pkgdir}/usr/share/zsh/site-functions" \ "${pkgdir}/usr/share/fish/vendor_completions.d" "${pkgdir}/usr/bin/${pkgname}" completion bash > "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" "${pkgdir}/usr/bin/${pkgname}" completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" } # vim: ts=2 sw=2 et: