diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/consul/APKBUILD | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/testing/consul/APKBUILD b/testing/consul/APKBUILD index ab1f4b0834..3cb3ac060a 100644 --- a/testing/consul/APKBUILD +++ b/testing/consul/APKBUILD @@ -21,14 +21,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/$pkgname/archive/v tls.json.sample" builddir="$srcdir/src/github.com/hashicorp/$pkgname" -check() { - cd "$builddir" - GOPATH="$srcdir" go test -} - prepare() { mkdir -p "$srcdir/src/github.com/hashicorp" - mv "$srcdir"/$pkgname-$pkgver "$builddir"/ || return 1 + mv "$srcdir"/$pkgname-$pkgver "$builddir"/ default_prepare } @@ -36,29 +31,34 @@ build() { cd "$builddir" GOPATH="$srcdir" go build -v -o bin/$pkgname \ - -ldflags "-X github.com/hashicorp/consul/version.GitDescribe='${pkgver}'" \ - --tags consul || return 1 + -ldflags "-X github.com/hashicorp/consul/version.GitDescribe='$pkgver'" \ + --tags consul +} + +check() { + cd "$builddir" + GOPATH="$srcdir" go test } package() { cd "$builddir" # Consul init script install -m755 -D "$srcdir"/$pkgname.initd \ - "$pkgdir"/etc/init.d/$pkgname || return 1 + "$pkgdir"/etc/init.d/$pkgname # Consul init conf install -m644 -D "$srcdir"/$pkgname.confd \ - "$pkgdir"/etc/conf.d/$pkgname || return 1 + "$pkgdir"/etc/conf.d/$pkgname # Main binary install -m750 -o root -g consul \ - -D bin/${pkgname} \ - "$pkgdir"/usr/sbin/${pkgname} || return 1 + -D bin/$pkgname \ + "$pkgdir"/usr/sbin/$pkgname # Consul datadir - install -m750 -o consul -g consul -d "$pkgdir"/var/${pkgname} || return 1 + install -m750 -o consul -g consul -d "$pkgdir"/var/$pkgname # Consul configdir - install -m750 -o root -g consul -d "$pkgdir"/etc/${pkgname} || return 1 + install -m750 -o root -g consul -d "$pkgdir"/etc/$pkgname # Consul sample config files for cf in acl.json.sample encrypt.json.sample server.json tls.json.sample; do - install -m640 -o root -g consul "$srcdir"/$cf "$pkgdir"/etc/${pkgname} || return 1 + install -m640 -o root -g consul "$srcdir"/$cf "$pkgdir"/etc/$pkgname done } sha512sums="8223f79aa1b7bfc5693168b56fbe9a506ca504771c92328afeb99e78dce8699c7532582749a372dfed10dd4b7c440ace0dd248f1ae27247059da3e2f88293a88 consul-1.0.0.tar.gz |