# Contributor: Michał Polański # Maintainer: Michał Polański pkgname=hcloud pkgver=1.36.0 pkgrel=3 pkgdesc="Command-line interface for Hetzner Cloud" url="https://github.com/hetznercloud/cli" license="MIT" arch="all" makedepends="go" subpackages=" $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/hetznercloud/cli/archive/v$pkgver/hcloud-$pkgver.tar.gz" builddir="$srcdir/cli-$pkgver" export CGO_ENABLED=0 export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { go build \ -ldflags "-X github.com/hetznercloud/cli/internal/version.Version=$pkgver" \ -v \ ./cmd/hcloud ./hcloud completion bash > $pkgname.bash ./hcloud completion fish > $pkgname.fish ./hcloud completion zsh > $pkgname.zsh } check() { go test ./... } package() { install -Dm755 hcloud -t "$pkgdir"/usr/bin/ install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" 222067a37afa67277750a2bf7c764ade4f108e48856cc1a2dbaae2a82fff2ff66bd77e2b15701d525365bfa67ef90265097490dcc83933e59cc21129a32598bb hcloud-1.36.0.tar.gz "