void-packages/srcpkgs/coredns/template

30 lines
875 B
Bash

# Template file for 'coredns'
pkgname=coredns
version=1.7.1
revision=1
build_style=go
go_import_path=github.com/coredns/coredns
hostmakedepends="git make mmark"
short_desc="CoreDNS is a DNS server that chains plugins"
maintainer="Noel Cower <ncower@nil.dev>"
license="Apache-2.0"
homepage="https://coredns.io"
distfiles="https://github.com/coredns/coredns/archive/v${version}.tar.gz"
checksum=766455a8beb6728da1a0f9dfa9368badddd282db51c7abae5fa99c82bfb53882
make_dirs="/etc/coredns 0750 root root"
_git_commit=f59c03d09c3a3a12f571ad1087b979325f3dae30
go_ldflags+=" -s -w -X github.com/coredns/coredns/coremain.GitCommit=${_git_commit}"
post_build() {
make -f Makefile.doc MMARK="$(command -v mmark) -man" man/coredns.1 man/corefile.5 plugins
}
post_install() {
for man in man/*.*; do
vman "${man}"
done
vsv coredns
vinstall "${FILESDIR}/Corefile" 640 etc/coredns
}