telegraf: template cleanup

This commit is contained in:
Michael Aldridge 2017-11-26 17:37:23 -08:00
parent 734a32bcda
commit 4c89702578
1 changed files with 5 additions and 16 deletions

View File

@ -1,13 +1,11 @@
# Template file for 'telegraf'
pkgname=telegraf
version=1.4.3
revision=1
_branch=release-1.4
_commit=b473b6a
revision=2
build_style="go"
nocross=https://travis-ci.org/kulinacs/void-packages/jobs/258706435
go_import_path="github.com/influxdata/${pkgname}"
build_wrksrc="_build-${pkgname}-xbps/src/${go_import_path}"
go_import_path="github.com/influxdata/telegraf"
go_package="${go_import_path}/cmd/telegraf"
go_ldflags="-X main.version=${version}"
hostmakedepends="go-gdm git"
system_accounts="_telegraf"
short_desc="The plugin-driven server agent for collecting & reporting metrics"
@ -17,20 +15,11 @@ homepage="https://www.influxdata.com/time-series-platform/telegraf/"
distfiles="https://github.com/influxdata/${pkgname}/archive/${version}.tar.gz"
checksum=5c4833a2dbaddf3fa55b90a971b804934934f097c9c7d502615044853e472617
post_extract() {
local path="${GOPATH}/src/${go_import_path}"
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
}
pre_build() {
cd $GOSRCPATH
gdm restore
}
do_build() {
go install -ldflags="-X main.version=${version} -X main.branch=${_branch} -X main.commit=${_commit}" ./...
}
post_install() {
vlicense LICENSE
vsv ${pkgname}