diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-19 17:51:01 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-19 17:51:01 +0200 |
commit | dcfb4368fdfcffd34c33e8e56f152d6e3106fb38 (patch) | |
tree | 69421aae32eac6234bbaa865e2419a52c9a6adeb /testing | |
parent | e62b778c5c81891d093c919d340c86b2b5a242bb (diff) | |
download | aports-dcfb4368fdfcffd34c33e8e56f152d6e3106fb38.tar.bz2 aports-dcfb4368fdfcffd34c33e8e56f152d6e3106fb38.tar.xz |
testing/vault: improve abuild, fix code-style
Diffstat (limited to 'testing')
-rw-r--r-- | testing/vault/APKBUILD | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/testing/vault/APKBUILD b/testing/vault/APKBUILD index 6aacbbd06b..20b3186dd3 100644 --- a/testing/vault/APKBUILD +++ b/testing/vault/APKBUILD @@ -6,51 +6,43 @@ pkgrel=0 pkgdesc="Vault is a tool for securely accessing secrets." url="https://www.vaultproject.io/" arch="all" -license="MPL 2.0" +license="MPL-2.0" depends="" -depends_dev="" -makedepends="go $depends_dev" +makedepends="go" install="$pkgname.pre-install" pkgusers="vault" pkggroups="vault" -subpackages="" options="!strip" -source="${pkgname}-${pkgver}.tar.gz::https://github.com/hashicorp/${pkgname}/archive/v${pkgver}.tar.gz - vault.confd - vault.hcl - vault.initd" - -_builddir="${srcdir}/${pkgname}-${pkgver}" - -prepare() { - cd "${_builddir}" - local i - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/$pkgname/archive/v$pkgver.tar.gz + vault.confd + vault.hcl + vault.initd" +builddir="$srcdir/$pkgname-$pkgver" build() { - cd "$_builddir" || return 1 - mkdir -p "${_builddir}/src/github.com/hashicorp" - ln -s "${_builddir}" "${_builddir}/src/github.com/hashicorp/vault" - GOPATH="${_builddir}" go build -x -v -o bin/${pkgname} || return 1 + cd "$builddir" + + mkdir -p "$builddir/src/github.com/hashicorp" + ln -s "$builddir" "$builddir/src/github.com/hashicorp/vault" + GOPATH="$builddir" go build -x -v -o bin/$pkgname || return 1 } package() { - cd "$_builddir" - install -m755 -D "${srcdir}/${pkgname}.initd" \ - "${pkgdir}/etc/init.d/${pkgname}" || return 1 - install -m644 -D "${srcdir}/${pkgname}.confd" \ - "${pkgdir}/etc/conf.d/$pkgname" || return 1 - install -m750 -o root -g vault \ - -D "${_builddir}/bin/${pkgname}" \ - "${pkgdir}/usr/sbin/${pkgname}" || return 1 - install -m750 -o vault -g vault -d "$pkgdir/var/lib/${pkgname}" || return 1 - install -m750 -o root -g vault -D "$srcdir/${pkgname}.hcl" \ - "$pkgdir/etc/${pkgname}.hcl" || return 1 + cd "$builddir" + + install -m755 -D "$srcdir/$pkgname.initd" \ + "$pkgdir/etc/init.d/$pkgname" || return 1 + + install -m644 -D "$srcdir/$pkgname.confd" \ + "$pkgdir/etc/conf.d/$pkgname" || return 1 + + install -m750 -o root -g vault -D bin/$pkgname \ + "$pkgdir/usr/sbin/$pkgname" || return 1 + + install -m750 -o root -g vault -D "$srcdir/$pkgname.hcl" \ + "$pkgdir/etc/$pkgname.hcl" || return 1 + + install -m750 -o vault -g vault -d "$pkgdir/var/lib/$pkgname" || return 1 } md5sums="246bf47e3a90eb5b7c855b83befd5841 vault-0.6.1.tar.gz |