summaryrefslogtreecommitdiff
path: root/net-mgmt/netdata-go/Makefile
blob: d3bee63686f61fce0dfbf7537ed15e3783e9f2d8 (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

PORTNAME=	netdata-go
DISTVERSIONPREFIX=	v
DISTVERSION=	0.28.1
CATEGORIES=	net-mgmt

MAINTAINER=	driesm.michiels@gmail.com
COMMENT=	External netdata collection plugin written in Go

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		go:modules

GO_MODULE=	github.com/netdata/go.d.plugin
GO_TARGET=	./cmd/godplugin:${PREFIX}/libexec/netdata/plugins.d/god.plugin

post-patch:
	${REINPLACE_CMD} -e 's|/etc/netdata|${PREFIX}/etc/netdata|g' ${WRKSRC}/cmd/godplugin/main.go

post-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/netdata/conf.d
	${INSTALL_DATA} ${WRKSRC}/config/go.d.conf ${STAGEDIR}${PREFIX}/lib/netdata/conf.d/go.d.conf.sample
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/netdata/conf.d/go.d
	cd ${WRKSRC}/config/go.d && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/netdata/conf.d/go.d
	(for file in ${STAGEDIR}${PREFIX}/lib/netdata/conf.d/go.d/*.conf; do \
		${MV} $$file $$file".sample"; \
	done)

.include <bsd.port.mk>