blob: 3650d11feec1b90b2c6ba41dbab4d1c2f39a5945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Maintainer: Patrik Cyvoct <patrik at ptrk dot io>
# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com>
pkgname=scaleway-cli
pkgver=2.5.1
pkgrel=1
pkgdesc="Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal."
arch=('x86_64')
url="https://scaleway.com"
license=('Apache')
makedepends=('go' 'git')
optdepends=(
'bash-completion: Bash completions'
'zsh-completions: ZSH completitons'
)
source=("https://github.com/scaleway/$pkgname/archive/v${pkgver}.tar.gz")
build() {
cd "$pkgname-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go build -ldflags "-X main.BuildDate=$(date -u '+%Y-%m-%dT%I:%M:%S%p')" \
-o scw ./cmd/scw/main.go
}
check() {
cd "$pkgname-$pkgver"
go test ./...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 scw "$pkgdir/usr/bin/scw"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
./scw autocomplete script shell=zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_scw"
./scw autocomplete script shell=bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/scw"
}
sha256sums=('af926168122c192b10a19d701f2a03a41f14897b2a6c654499203edd2aafcafe')
# vim:set ts=2 sw=2 et:
|