aboutsummaryrefslogtreecommitdiffstats
path: root/testing/consul-replicate/APKBUILD
blob: e41e1d73981db2ead2e31adf2c7fac6c2c667813 (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
# Contributor: Gennady Feldman <gena01@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=consul-replicate
pkgver=0.4.0
pkgrel=23
pkgdesc="Consul cross-DC KV replication daemon"
url="https://www.consul.io/"
arch="all"
license="MPL-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/consul-replicate/archive/v$pkgver.tar.gz"

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

build() {
	mkdir -p "$builddir/src/github.com/hashicorp"
	ln -sf "$builddir" "$builddir/src/github.com/hashicorp/$pkgname"
	cd "$builddir/src/github.com/hashicorp/$pkgname"

	GOPATH="$builddir" go build -v -o bin/$pkgname
}

package() {
	# Main binary
	install -m750 -D bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
960f8a54890932663d832247e2f9eec536a6e4f21e3e1f602399e9465cbb355eb2e4dcbc198bd2362442088c1912664b0640b59ce099c988508f4715b73fbcd7  consul-replicate-0.4.0.tar.gz
"