1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/testing/scaleway-cli/APKBUILD
2023-02-15 04:17:08 +01:00

44 lines
1.3 KiB
Text

# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=scaleway-cli
pkgver=2.8.0
pkgrel=2
pkgdesc="Command-line client for Scaleway Cloud"
url="https://www.scaleway.com/en/cli"
arch="all !x86 !armv7 !armhf" # tests are failing for x86, armv7, armhf
license="Apache-2.0"
makedepends="go"
source="scaleway-cli-$pkgver.tar.gz::https://github.com/scaleway/scaleway-cli/archive/refs/tags/v$pkgver.tar.gz"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -o scw ./cmd/scw/main.go
PATH=. scw autocomplete script shell=bash > bashcomp
PATH=. scw autocomplete script shell=fish > fishcomp
PATH=. scw autocomplete script shell=zsh > zshcomp
}
check() {
go test -v ./...
}
package() {
install -Dm755 scw "$pkgdir"/usr/bin/scw
install -Dm644 bashcomp "$pkgdir"/usr/share/bash-completion/completions/scw
install -Dm644 fishcomp "$pkgdir"/usr/share/fish/completions/scw.fish
install -Dm644 zshcomp "$pkgdir"/usr/share/zsh/site-functions/_scw
}
sha512sums="
7457c77c36c96e73d9b626a0091f1bc6fac9f1ad0cb227d604c7e3719d63051494e6cfbd77b4828a36f7ee1d7462a2dc0eaabd3031e52525e03cc04ff0865511 scaleway-cli-2.8.0.tar.gz
"