2017-12-03 00:43:53 +00:00
|
|
|
# Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
|
2018-05-01 15:35:14 +00:00
|
|
|
# Contributor: Tim Meusel <tim@bastelfreak.de>
|
2021-05-21 23:30:49 +00:00
|
|
|
# Contributor: Sebastian Rakel <sebastian@devunit.eu>
|
2021-09-29 18:22:45 +00:00
|
|
|
# Contributor: Justin Kromlinger <hashworks@archlinux.org>
|
2021-12-10 08:50:03 +00:00
|
|
|
# Contributor: Andrew Tyler <assimilat@gmail.com>
|
2018-01-09 14:04:37 +00:00
|
|
|
|
2017-12-03 00:43:53 +00:00
|
|
|
pkgname='vault'
|
|
|
|
pkgdesc='A tool for managing secrets'
|
2022-03-04 07:04:32 +00:00
|
|
|
pkgver=1.9.4
|
2022-03-11 11:35:59 +00:00
|
|
|
pkgrel=2
|
2018-05-01 15:35:14 +00:00
|
|
|
url="https://vaultproject.io/"
|
2017-12-03 00:43:53 +00:00
|
|
|
license=('MPL')
|
|
|
|
arch=('x86_64')
|
2022-03-11 11:35:59 +00:00
|
|
|
makedepends=('go' 'git' 'yarn' 'bower' 'nodejs-lts-fermium' 'npm' 'zip' 'gox' 'go-tools')
|
2017-12-03 00:43:53 +00:00
|
|
|
depends=('glibc')
|
|
|
|
install='vault.install'
|
|
|
|
backup=('etc/vault.hcl')
|
2022-03-04 07:04:32 +00:00
|
|
|
_vault_commit='fcbe948b2542a13ee8036ad07dd8ebf8554f56cb'
|
2017-12-03 00:43:53 +00:00
|
|
|
source=("git+https://github.com/hashicorp/vault#commit=${_vault_commit}"
|
2021-12-10 08:50:03 +00:00
|
|
|
'vault.service'
|
|
|
|
'vault.sysusers'
|
|
|
|
'vault.tmpfiles'
|
|
|
|
'vault.hcl')
|
2017-12-03 00:43:53 +00:00
|
|
|
sha512sums=('SKIP'
|
2017-12-14 15:24:52 +00:00
|
|
|
'6619cf57668e995cddb29fb6c388c18c21b251052a53832415e415bb4fe538361ef77b74536f5b082b9cda6cd71b598fc50d8b7f51092c4d60262052c5725af2'
|
2018-01-09 14:04:37 +00:00
|
|
|
'92616ccf83fa5ca9f8b0d022cf8ceb1f3549e12b66bf21d9f77f3eb26bd75ec1dc36c155948ec987c642067b85fbfc30a9217d6c503d952a402aa5ef63e50928'
|
|
|
|
'073f0f400cba78521cd2709ce86d88fbb14125117f9f3beca657f625d04eab8e00f7a01b5d9a1cfc03e9038844f5732bdbb1a85dd65a803d3f0b90f8bf87880e'
|
2020-06-21 23:10:56 +00:00
|
|
|
'46106cc76151eef2dd5e4b2caa6a96aae4d6ce1ecbf977dcc8667a3f6c829cbea95133622adafcb15cdfaa066ecc94c73c983e7613ee2f6573694981569729fe')
|
2017-12-03 00:43:53 +00:00
|
|
|
|
2021-12-10 08:50:03 +00:00
|
|
|
prepare() {
|
2017-12-03 00:43:53 +00:00
|
|
|
export GOPATH="${srcdir}"
|
2020-01-13 21:43:43 +00:00
|
|
|
mkdir -p src/github.com/hashicorp/ "$GOPATH/bin"
|
2018-05-01 15:35:14 +00:00
|
|
|
mv "${pkgname}" "src/github.com/hashicorp/${pkgname}"
|
|
|
|
export PACKAGE_ROOT="${GOPATH}/src/github.com/hashicorp/${pkgname}"
|
2020-01-13 21:43:43 +00:00
|
|
|
cd $PACKAGE_ROOT
|
2021-09-29 17:56:12 +00:00
|
|
|
|
|
|
|
sed -i 's/gofumpt/gofmt/g' Makefile
|
2017-12-03 00:43:53 +00:00
|
|
|
}
|
|
|
|
|
2021-09-30 13:04:05 +00:00
|
|
|
pkgver() {
|
|
|
|
cd $PACKAGE_ROOT
|
|
|
|
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
|
|
|
}
|
|
|
|
|
2021-12-10 08:50:03 +00:00
|
|
|
build() {
|
2018-05-01 15:35:14 +00:00
|
|
|
cd $PACKAGE_ROOT
|
2020-07-05 14:11:49 +00:00
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
2021-12-10 08:50:03 +00:00
|
|
|
export XC_OSARCH='linux/amd64'
|
|
|
|
grep "^[a-z].*plugin[:]" Makefile | cut -f1 -d: | while IFS= read -r plugin; do
|
|
|
|
make "$plugin"
|
|
|
|
done
|
|
|
|
make static-dist bin
|
2017-12-03 00:43:53 +00:00
|
|
|
}
|
|
|
|
|
2021-12-10 08:50:03 +00:00
|
|
|
package() {
|
2018-05-01 15:35:14 +00:00
|
|
|
cd ${PACKAGE_ROOT}
|
|
|
|
install -Dm755 bin/vault "${pkgdir}/usr/bin/vault"
|
|
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
install -Dm644 "${srcdir}/vault.hcl" "${pkgdir}/etc/vault.hcl"
|
|
|
|
install -Dm644 "${srcdir}/vault.service" "${pkgdir}/usr/lib/systemd/system/vault.service"
|
|
|
|
install -Dm644 "${srcdir}/vault.sysusers" "${pkgdir}/usr/lib/sysusers.d/vault.conf"
|
|
|
|
install -Dm644 "${srcdir}/vault.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/vault.conf"
|
2021-05-21 23:30:49 +00:00
|
|
|
for file in README.md CHANGELOG.md CONTRIBUTING.md; do
|
2018-05-01 15:35:14 +00:00
|
|
|
install -Dm644 "${file}" "${pkgdir}/usr/share/doc/${pkgname}/${file}"
|
|
|
|
done
|
2017-12-03 00:43:53 +00:00
|
|
|
}
|