aboutsummaryrefslogtreecommitdiffstats
path: root/testing/consul
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.dk>2017-10-26 11:42:13 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2017-10-28 10:48:07 +0200
commit270482be202256d47c16aa0f16f87fe3f205d458 (patch)
tree650853b770968184f493a19e5ed8cab7762db778 /testing/consul
parenta7129171432d696808c77f615f6051f1c6a3ded9 (diff)
downloadaports-270482be202256d47c16aa0f16f87fe3f205d458.tar.bz2
aports-270482be202256d47c16aa0f16f87fe3f205d458.tar.xz
testing/consul: upgrade to 1.0.0
Modernize the APKBUILD while being here.
Diffstat (limited to 'testing/consul')
-rw-r--r--testing/consul/APKBUILD30
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