summaryrefslogtreecommitdiff
path: root/net-mgmt/telegraf/Makefile
blob: 2af1441cbb6d0bb1f5f3f590b71b92081c79b3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PORTNAME=	telegraf
DISTVERSIONPREFIX=v
DISTVERSION=	1.30.1
PORTREVISION=	2
CATEGORIES=	net-mgmt

MAINTAINER=	girgen@FreeBSD.org
COMMENT=	Time-series data collection
WWW=		https://influxdata.com/time-series-platform/telegraf/

LICENSE=	MIT

ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7

USES=		go:1.22,modules

USE_RC_SUBR=	telegraf

GO_MODULE=	github.com/influxdata/telegraf
GO_BUILDFLAGS=	-ldflags "-X main.goos=freebsd -X main.goarch=${ARCH} -X main.version=${DISTVERSION}"
GO_TARGET=	./cmd/telegraf

SUB_FILES=	telegraf
SUB_LIST=	TELEGRAF_USER=${TELEGRAF_USER} \
		TELEGRAF_GROUP=${TELEGRAF_GROUP} \
		TELEGRAF_LOGDIR=${TELEGRAF_LOGDIR}
PLIST_SUB=	TELEGRAF_USER=${TELEGRAF_USER} \
		TELEGRAF_GROUP=${TELEGRAF_GROUP} \
		TELEGRAF_LOGDIR=${TELEGRAF_LOGDIR}

TELEGRAF_USER=	telegraf
TELEGRAF_GROUP=	telegraf

USERS=		${TELEGRAF_USER}
GROUPS=		${TELEGRAF_GROUP}

TELEGRAF_LOGDIR=/var/log/${PORTNAME}

post-install:
	${MKDIR} ${STAGEDIR}${TELEGRAF_LOGDIR}

.include <bsd.port.mk>