New package: telegraf-1.3.5

This commit is contained in:
Nicklaus McClendon 2017-08-30 15:56:18 -05:00 committed by Michael Aldridge
parent 4f3881c282
commit 2686717cc8
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# TELEGRAF_CONF=
# TELEGRAF_CONFDIR=
if [ ! -z "$TELEGRAF_CONF" ]
then
TELEGRAF_CONF_LINE="--config=${TELEGRAF_CONF}"
else
TELEGRAF_CONF_LINE=
fi
if [ ! -z "$TELEGRAF_CONFDIR" ]
then
TELEGRAF_CONFDIR_LINE="--config-directory=${TELEGRAF_CONFDIR}"
else
TELEGRAF_CONFDIR_LINE=
fi

View file

@ -0,0 +1,4 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
exec chpst -u _telegraf:_telegraf telegraf "$TELEGRAF_CONF_LINE" "$TELEGRAF_CONFDIR_LINE" 2>&1

37
srcpkgs/telegraf/template Normal file
View file

@ -0,0 +1,37 @@
# Template file for 'telegraf'
pkgname=telegraf
version=1.3.5
revision=1
_branch=release-1.3
_commit=0f419e9a
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}"
hostmakedepends="go-gdm git"
system_accounts="_telegraf"
short_desc="The plugin-driven server agent for collecting & reporting metrics"
maintainer="Nicklaus McClendon <nicklaus@kulinacs.com>"
license="MIT"
homepage="https://www.influxdata.com/time-series-platform/telegraf/"
distfiles="https://github.com/influxdata/${pkgname}/archive/${version}.tar.gz"
checksum=b4663e57b0ca71c9d126a8fdd87b64a0ab2b5bd5fa98ba579f0deb00aac27d4c
post_extract() {
local path="${GOPATH}/src/${go_import_path}"
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
}
pre_build() {
gdm restore
}
do_build() {
make build VERSION=${version} BRANCH=${_branch} COMMIT=${_commit}
}
post_install() {
vlicense LICENSE
vsv ${pkgname}
}