Commit c47c5de9 authored by Will Sinatra's avatar Will Sinatra Committed by Leo

testing/doctl: new aport

Official command line interface for the DigitalOcean API
https://github.com/digitalocean/doctlCo-authored-by: Leo's avatarLeo <thinkabit.ukim@gmail.com>
parent 33f5e67a
# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=doctl
pkgver=1.46.0
pkgrel=0
pkgdesc="Official command line interface for the DigitalOcean API"
options="!check" # 3 tests fail
url="https://github.com/digitalocean/doctl"
license="Apache"
arch="all !mips !mips64"
makedepends="go"
subpackages="
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
source="https://github.com/digitalocean/doctl/archive/v$pkgver/doctl-$pkgver.tar.gz"
build() {
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-ldflags "-extldflags \"$LDFLAGS\"" \
./cmd/...
}
check() {
go test -v -mod=readonly ./integration
}
package() {
install -Dm 755 doctl -t "$pkgdir/usr/bin"
# setup completions
mkdir -p "$pkgdir"/usr/share/bash-completion/completions \
"$pkgdir"/usr/share/zsh/site-functions \
"$pkgdir"/usr/share/fish/completions
"$pkgdir"/usr/bin/doctl completion bash > "$pkgdir"/usr/share/bash-completion/completions/doctl
"$pkgdir"/usr/bin/doctl completion zsh > "$pkgdir"/usr/share/zsh/site-functions/_doctl
"$pkgdir"/usr/bin/doctl completion fish > "$pkgdir"/usr/share/fish/completions/doctl.fish
}
sha512sums="32f616ac9836736201cb4367d509e23caba2e74e2414847f55cdf0db16ec08b8b587ea4becaa71884bb5e924dce17b008c77a4e0ed0990b504d937bdd0de36f3 doctl-1.46.0.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment