summaryrefslogtreecommitdiff
path: root/net-mgmt/ping_exporter/Makefile
blob: e04ab10b6f2f69b821c88343d7b68a1148e9c729 (plain) (blame)
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
PORTNAME=	ping_exporter
DISTVERSION=	1.1.4
PORTREVISION=	4
CATEGORIES=	net-mgmt

MAINTAINER=	ivy@FreeBSD.org
COMMENT=	Prometheus exporter for ICMP echo requests
WWW=		https://github.com/czerwonk/ping_exporter

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		go:modules

USE_GITHUB=	yes
GH_ACCOUNT=	czerwonk

USE_RC_SUBR=	ping_exporter

GO_MOD_DIST=	github
GO_MODULE=	github.com/czerwonk/ping_exporter
GO_TARGET=	.:ping_exporter

SUB_FILES=	pkg-message

post-install:
	${INSTALL_DATA} ${PATCHDIR}/ping_exporter.yml.sample \
		${STAGEDIR}${PREFIX}/etc/ping_exporter.yml.sample
	${MKDIR} ${STAGEDIR}${DATADIR}/syslog.d \
		${STAGEDIR}${DATADIR}/newsyslog.conf.d
	${INSTALL_DATA} ${PATCHDIR}/ping_exporter.syslog \
		${STAGEDIR}${DATADIR}/syslog.d/ping_exporter.conf
	${INSTALL_DATA} ${PATCHDIR}/ping_exporter.newsyslog \
		${STAGEDIR}${DATADIR}/newsyslog.conf.d/ping_exporter.conf

.include <bsd.port.mk>