diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-10 21:05:55 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-10 21:05:55 +0000 |
commit | 71deace00d1a2b091313fe137ab7092418c6f87c (patch) | |
tree | 9f1f0dee23e13658e52f49437befe78427148c51 /net-analyzer/telegraf/telegraf-1.13.3.ebuild | |
parent | 29aabba0ea759c6a2864ff5631735b67ee38e5e0 (diff) |
gentoo resync : 10.02.2020
Diffstat (limited to 'net-analyzer/telegraf/telegraf-1.13.3.ebuild')
-rw-r--r-- | net-analyzer/telegraf/telegraf-1.13.3.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/net-analyzer/telegraf/telegraf-1.13.3.ebuild b/net-analyzer/telegraf/telegraf-1.13.3.ebuild new file mode 100644 index 000000000000..264ae05a70d3 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.13.3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +EGO_PN=github.com/influxdata/telegraf + +inherit systemd + +MY_PV="${PV/_rc/-rc.}" +COMMIT=da364558 + +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://github.com/influxdata/telegraf/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" + +BDEPEND="dev-lang/go" +DEPEND="acct-group/telegraf + acct-user/telegraf" + RDEPEND="${DEPEND}" + +src_prepare() { + default + mv ../vendor . +} + +src_compile() { + echo module ${EGO_PN} > go.mod + set -- env GO111MODULE=on go build -mod vendor -v -x -o telegraf \ + -ldflags="-X main.commit=${COMMIT} -X main.version=${PV}" \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die +} + +src_install() { + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} |