aboutsummaryrefslogtreecommitdiffstats
path: root/testing/exoscale/APKBUILD
blob: 89f6655383b9a8d28f524ac2d9163346f09eb981 (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.2
pkgrel=0
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="
7e935ff794a6c7e3236a6f2557f5a9c1d2662e7333d137bbbb866d4d1b889dc07b604643ffebaf20da4fa97bfe09fc1e84f57159c38edc2e4ea902a51b7cf680  exoscale-1.59.2.tar.gz
76ff5e33b58dd95ad2e89dd5d301c157ebf55ec5781433b09fdce8579bd4674c1efc85a64bb542515ae88ab933e6d5813ba108cc44e68b2644f20e94269e41a3  go.mk-29048924e7010732530539de67407bb2715e181b.tar.gz
"