aboutsummaryrefslogtreecommitdiffstats
path: root/community/vault/APKBUILD
blob: 1fb030029a1c5915af8245b708f3cde6c0eef30b (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Christian Kampka <christian@kampka.net>
# Maintainer: Gennady Feldman <gena01@gmail.com>
pkgname=vault
pkgver=1.3.2
pkgrel=0
pkgdesc="Vault is a tool for securely accessing secrets"
url="https://www.vaultproject.io/"
arch="all !s390x"
license="MPL-2.0"
makedepends="libcap bash make go python3 go-bindata-assetfs"
install="$pkgname.pre-install"
pkgusers="vault"
pkggroups="vault"
subpackages="$pkgname-openrc"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/vault/archive/v$pkgver.tar.gz
	go-mod-thrift.patch
	static-assets.patch
	vault.confd
	vault.hcl
	vault.initd"

build() {
	CGO_ENABLED=0 make prep
	CGO_ENABLED=0 go build -v -o bin/$pkgname \
		-ldflags "-X github.com/hashicorp/vault/version.GitDescribe='$pkgver'"
}

package() {
	install -m755 -D "$srcdir/$pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname"

	install -m644 -D "$srcdir/$pkgname.confd" \
		"$pkgdir/etc/conf.d/$pkgname"

	install -m750 -o root -g vault -D bin/$pkgname \
		"$pkgdir/usr/sbin/$pkgname"

	# Allow vault to use mlock as "vault" user.
	setcap cap_ipc_lock=+ep \
		"$pkgdir/usr/sbin/$pkgname"

	install -m750 -o root -g vault -D "$srcdir/$pkgname.hcl" \
		"$pkgdir/etc/$pkgname.hcl"

	install -m750 -o vault -g vault -d "$pkgdir/var/lib/$pkgname"
}

sha512sums="7335be2e16a1b39e94d0d8c32537cc8401f5f449b9cd6936cd72fe9f8da68e5c1c7521bd51f32eedd39ee67e637a04387388e34b78ef701cf16a96a66071577a  vault-1.3.2.tar.gz
66829e576ed54f8b228467d851446ce866fbda51c4e162aba3f83f719067c810dba12960e5ae42c93ba6bc14f703cd7c032f2fda004cfe11fe9449f78a074c58  go-mod-thrift.patch
e551aa366287ca86436b14c72c254d739c2492dec7a877da135ba81bf2170bbe694f2ac98798d5855004a0aca406a27c1bdf0c791844f1bd330ea3a1160c6327  static-assets.patch
6f3f30e5c9d9dd5117f18fce0e669f0cd752a6be4910405d6b394f15273372731ee887a5ba4c700293e5b8bc2bf40fd69d4337156f77b03549d2dc2c0a666bec  vault.confd
8c064aa5dcca84822c1fa85e9d0ff520df46f794b2e9c689a9b4f81f74279387b3aebc08b3ca26cf786c2fcf1a330e765bf5a511074c24f87e5346672346ba1c  vault.hcl
9a1846a10eff015cf7d4c8c2c20540c125213302925e54bdfae1c1ec9c43bf0e97b3433c041615c9fdc7d5e9468a0f606321991c597af3be92025bd5042c08df  vault.initd"