aboutsummaryrefslogtreecommitdiffstats
path: root/testing/consul-replicate/APKBUILD
blob: 0c7e70c721d8ac911d985184d0916612059f8fbf (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.3.1
pkgrel=0
pkgdesc="Consul cross-DC KV replication daemon"
url="https://www.consul.io/"
arch="all"
license="MPL-2.0"
depends=""
makedepends="go"
options="!strip"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	mkdir -p "$builddir/src/github.com/hashicorp"
	ln -s "$builddir" "$builddir/src/github.com/hashicorp/$pkgname"
	cd "$builddir/src/github.com/hashicorp/$pkgname" || return 1

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

package() {
	cd "$builddir"

	# Main binary
	install -m750 -D bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="4fa1ab24d7e54b4055ddf7af71743ce93bcbf1ec7efe7777c6e8bf041f75f0d9c89d1d1d11a7db1702cdf4aedb463913e0c7c6c08810f34960b022717f246b23  consul-replicate-0.3.1.tar.gz"