aboutsummaryrefslogtreecommitdiffstats
path: root/testing/exoscale/APKBUILD
blob: 92e1f7963d89fc7d096f4f2ee641a239d22b2e4d (plain) (blame)
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
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=exoscale
pkgver=1.59.1
pkgrel=1
pkgdesc="Command-line tool for everything at Exoscale"
url="https://github.com/exoscale/cli"
arch="all"
license="Apache-2.0"
makedepends="go"
_gomkrev="29048924e7010732530539de67407bb2715e181b"
source="https://github.com/exoscale/cli/archive/refs/tags/v$pkgver/exoscale-$pkgver.tar.gz
	https://github.com/exoscale/go.mk/archive/$_gomkrev/go.mk-$_gomkrev.tar.gz
	"
builddir="$srcdir/cli-$pkgver"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

prepare() {
	default_prepare

	mv "$srcdir"/go.mk-$_gomkrev/* go.mk/
}

build() {
	go build -o exo -ldflags "-X main.version=$pkgver"
}

check() {
	go test github.com/exoscale/cli/cmd
}

package() {
	install -Dm755 exo -t "$pkgdir"/usr/bin
}

sha512sums="
c9364ef68fd93454fbc38df2ddcc7ffcc1bffd188411a3f1f5096e15b9684b4f680872d9fa40bd8208532ec8a14656bbebaaff04511330c9db67229d961eac07  exoscale-1.59.1.tar.gz
76ff5e33b58dd95ad2e89dd5d301c157ebf55ec5781433b09fdce8579bd4674c1efc85a64bb542515ae88ab933e6d5813ba108cc44e68b2644f20e94269e41a3  go.mk-29048924e7010732530539de67407bb2715e181b.tar.gz
"