2023-10-12 06:27:02 +02:00

57 lines
1.5 KiB
Plaintext

# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=dapr-cli
pkgver=1.11.0
# API version described in https://docs.dapr.io/reference/api/
_runtimever=1.0
pkgrel=4
pkgdesc="CLI tool for Dapr the portable, event-driven runtime to build distributed applications"
url="https://dapr.io/"
# 32-bit: not useful
arch="all !x86 !armhf !armv7"
license="Apache-2.0"
makedepends="go"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="$pkgname-$pkgver.tar.gz::https://github.com/dapr/cli/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/cli-$pkgver"
build() {
export CGO_ENABLED=0
local _goldflags="
-X main.version=$pkgver
-X main.apiVersion=$_runtimever
-X github.com/dapr/cli/pkg/standalone.gitversion=0000000
-X github.com/dapr/cli/pkg/standalone.gitcommit=AlpineLinux
"
go build -v -ldflags "$_goldflags" -o dapr
for shell in bash fish zsh; do
./dapr completion $shell > dapr.$shell
done
}
check() {
# Avoid integration tests that require a local Docker or Kubernetes instance
go test ./pkg/...
}
package() {
install -Dm755 dapr -t "$pkgdir"/usr/bin/
install -Dm644 dapr.bash \
"$pkgdir"/usr/share/bash-completion/completions/dapr
install -Dm644 dapr.fish \
"$pkgdir"/usr/share/fish/vendor_completions.d/dapr.fish
install -Dm644 dapr.zsh \
"$pkgdir"/usr/share/zsh/site-functions/_dapr
}
sha512sums="
d486b5ab3d62e8d34d798146d3479d1341577d800da59466950542f607033c85f1a44f137fe278d99b9d5b3cedb44d1a1636e428836f5078299b7a53cf97016c dapr-cli-1.11.0.tar.gz
"