From 4c89702578fe79572f01b2df11a74c6c65042fb0 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Sun, 26 Nov 2017 17:37:23 -0800 Subject: [PATCH] telegraf: template cleanup --- srcpkgs/telegraf/template | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/srcpkgs/telegraf/template b/srcpkgs/telegraf/template index df5e42fc9d6..08424bd85da 100644 --- a/srcpkgs/telegraf/template +++ b/srcpkgs/telegraf/template @@ -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}