# Contributor: Gennady Feldman # Maintainer: Francesco Colista pkgname=consul-template pkgver=0.22.0 pkgrel=0 pkgdesc="Generic template rendering and notifications with Consul" url="https://www.consul.io/" arch="all" license="MPL-2.0" makedepends="go" options="!check" subpackages="$pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/consul-template/archive/v$pkgver.tar.gz consul-template.hcl consul-template.initd " build() { CGO_ENABLED="0" go build -a -v -o bin/$pkgname \ -ldflags "-s -w -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 -Dm644 "$srcdir"/consul-template.initd "$pkgdir"/etc/init.d/"$pkgname" } sha512sums="0875a4a20ba9e9e078cd26c620cb9edbd22193b6b5fe25bb6006bd7d3272dcf29d7051448d3672f9d9caaa1b871f08b050fa07882933ad6d13b90d1c8f6406af consul-template-0.22.0.tar.gz bfb5c7eed53cfe45d9e03eeb68eb454d2f47a47402a99b008895c261389160d611ab72903cdfb98e99a88749e0fd00733a9fad70b9def9af35657cba12987ea9 consul-template.hcl 728f307cacd63abc35b4e6761cbebb9f4eb41e0b04e7969a1eac6585a65864d998654aee8ac8669ad3dfdc8115f9bf529dccf9396451b3ba7ab840a95a1f2a29 consul-template.initd"