1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/sysutils/snmp_exporter/Makefile
Kirill Ponomarev 1a8cb1886f Update to 0.11.0 and log to syslog
PR:		226435
Submitted by:	David O'Rourke <dor.bsd@xm0.uk>
Approved by:	maintainer
2018-06-16 14:21:11 +00:00

38 lines
1.0 KiB
Makefile

# $FreeBSD$
PORTNAME= snmp_exporter
PORTVERSION= 0.11.0
DISTVERSIONPREFIX=v
CATEGORIES= sysutils
MAINTAINER= fabian.freyer@physik.tu-berlin.de
COMMENT= SNMP Exporter for Prometheus
LICENSE= APACHE20
LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
USES= go
USE_GITHUB= yes
USE_RC_SUBR= snmp_exporter
GH_ACCOUNT= prometheus
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME}
do-build:
(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET})
(cd ${GO_WRKSRC}/generator; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET}/generator)
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${GO_WRKSRC}/generator/main.go
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/snmp_exporter/
${INSTALL_DATA} ${FILESDIR}/generator.yml ${STAGEDIR}${PREFIX}/etc/snmp_exporter/generator.yml
${INSTALL_PROGRAM} ${WRKDIR}/bin/snmp_exporter ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/bin/generator ${STAGEDIR}${PREFIX}/bin/snmp_exporter_generator
.include <bsd.port.mk>