blob: 8a28b3cd930854676ef3746a793a16e5a3db1fbe (
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
55
56
57
58
59
60
61
62
63
64
|
# Contributor: Christian Kampka <christian@kampka.net>
# Maintainer: Gennady Feldman <gena01@gmail.com>
pkgname=vault
pkgver=1.1.0
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 python2 yarn npm 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/$pkgname/archive/v$pkgver.tar.gz
bindata-filename.patch
vault.confd
vault.hcl
vault.initd"
builddir="$srcdir/src/github.com/hashicorp/$pkgname"
prepare() {
mkdir -p "$srcdir/src/github.com/hashicorp"
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
default_prepare
}
build() {
cd "$builddir"
GOPATH="$srcdir" CGO_ENABLED=0 make static-dist prep
GOPATH="$srcdir" CGO_ENABLED=0 go build -v -o bin/$pkgname \
-ldflags "-X github.com/hashicorp/vault/version.GitDescribe='$pkgver'" \
--tags ui
}
package() {
cd "$builddir"
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="b0bc32f438e8432d849aa896f610c9532fa923384d40749efe49985d64a91f4768a3309af449efd8c8ab4604ecdb2474c39999bfe196f0f876894f788618ae61 vault-1.1.0.tar.gz
0a2dc4d2deb42c77a225451a3c3cf68063435bc077495a6b207cfa2e2b446c9dba5ac726f9a7ec0be7f52e4519e7563c49561397750a069f5536fda66843ace4 bindata-filename.patch
6f3f30e5c9d9dd5117f18fce0e669f0cd752a6be4910405d6b394f15273372731ee887a5ba4c700293e5b8bc2bf40fd69d4337156f77b03549d2dc2c0a666bec vault.confd
8c064aa5dcca84822c1fa85e9d0ff520df46f794b2e9c689a9b4f81f74279387b3aebc08b3ca26cf786c2fcf1a330e765bf5a511074c24f87e5346672346ba1c vault.hcl
1e436932647b191e691f5c60bec4ad926588cee5119c7cbe61345249a6768472387b6dd8b19b954c8ac80fb97f6e68f93749229b216300b0438dbeb0bdb57957 vault.initd"
|