aports/community/consul-template/APKBUILD
2025-05-11 17:42:12 +02:00

44 lines
1.6 KiB
Text

# Contributor: Gennady Feldman <gena01@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=consul-template
pkgver=0.40.0
pkgrel=3
pkgdesc="Generic template rendering and notifications with Consul"
url="https://www.consul.io/"
arch="all"
license="MPL-2.0"
makedepends="go"
options="!check chmod-clean net"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/consul-template/archive/refs/tags/v$pkgver.tar.gz
consul-template.hcl
consul-template.initd
"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
# secfixes:
# 0.29.2-r0:
# - CVE-2022-38149
build() {
go build -a -v -o bin/$pkgname \
-ldflags "
-X github.com/hashicorp/$pkgname/version.Name=$pkgname \
-X github.com/hashicorp/$pkgname/version.GitCommit=$pkgver"
}
package() {
# Main binary
install -m750 -D bin/$pkgname "$pkgdir"/usr/sbin/$pkgname
install -Dm644 "$srcdir"/consul-template.hcl "$pkgdir"/etc/"$pkgname"/"$pkgname".hcl
install -Dm755 "$srcdir"/consul-template.initd "$pkgdir"/etc/init.d/"$pkgname"
}
sha512sums="
277206c4260d8f0b46a04766b0b27091042539fc7dbcf01fb03db49407fb59b62cde45b5d3e8e7544286b30d61b12058be78e80be3d3016323d73e656bc1f2b9 consul-template-0.40.0.tar.gz
bfb5c7eed53cfe45d9e03eeb68eb454d2f47a47402a99b008895c261389160d611ab72903cdfb98e99a88749e0fd00733a9fad70b9def9af35657cba12987ea9 consul-template.hcl
d8465a24ca721d57677a25f3f988f37f78147aae83d00c9055663cbd76734a490233691827561138bd02f10067c94c309fb8a0c3473c3b361edb4faa7005fbcb consul-template.initd
"