upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / doctl / trunk / PKGBUILD
blob34ee4f4a317a8ea1e150ad6f7d82c18d03cb4b21
1 # Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: NOGISAKA Sadata <ngsksdt@gmail.com>
4 # Contributor: Bennett Piater <bennett at piater dot name>
6 pkgname=doctl
7 pkgver=1.95.0
8 pkgrel=1
9 pkgdesc='The official command line interface for the DigitalOcean API'
10 url='https://github.com/digitalocean/doctl'
11 arch=('x86_64')
12 license=('Apache')
13 depends=('glibc')
14 makedepends=('go')
15 source=(https://github.com/digitalocean/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
16 sha512sums=('2b1d4d6c2e63d880cfb6c8ffa712c510ea598b2b0d1c085e6ab32fe3faf9f7a8fe40116cb30e56d0d8f88ce28ce46c0f8412d06cff90722f422db02fe3a4ac45')
17 b2sums=('fd7f6e7fb650b1b265672dab2d4762cffbd44c5deadcf4a3e544ac1bcc33fdd5ac0d6f4c3a8f3a2f387946d4340c84ea692d18d6b095df7d375e1d9bd97af245')
19 build() {
20   cd ${pkgname}-${pkgver}
21   go build \
22     -trimpath \
23     -buildmode=pie \
24     -mod=readonly \
25     -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
26     ./cmd/...
29 package() {
30   cd ${pkgname}-${pkgver}
31   install -Dm 755 "${pkgname}" -t "${pkgdir}/usr/bin"
33   # setup completions
34   install -dm 755 "${pkgdir}/usr/share/bash-completion/completions" \
35                   "${pkgdir}/usr/share/zsh/site-functions" \
36                  "${pkgdir}/usr/share/fish/vendor_completions.d"
37   "${pkgdir}/usr/bin/${pkgname}" completion bash > "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
38   "${pkgdir}/usr/bin/${pkgname}" completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
39   "${pkgdir}/usr/bin/${pkgname}" completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
42 # vim: ts=2 sw=2 et: