aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2019-08-17 01:55:45 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2019-08-17 01:55:45 +0000
commit25e635087c5c6588ae24a788c7ed04b8f87bad75 (patch)
tree46c55efebc72fbc511f7fe3fdc2fa27cdfc2e325 /sysutils
parentc35fa7d485af3e4251983e10d97eb29ddf736d23 (diff)
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/snmp_exporter/Makefile14
1 files changed, 4 insertions, 10 deletions
diff --git a/sysutils/snmp_exporter/Makefile b/sysutils/snmp_exporter/Makefile
index 56e0a56f1641..465e1536dadd 100644
--- a/sysutils/snmp_exporter/Makefile
+++ b/sysutils/snmp_exporter/Makefile
@@ -12,26 +12,20 @@ LICENSE= APACHE20
LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
-USES= go
+USES= go:modules
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)
+GO_TARGET= . ./generator
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${GO_WRKSRC}/generator/main.go
-do-install:
+post-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
+ ${MV} ${STAGEDIR}${PREFIX}/bin/generator ${STAGEDIR}${PREFIX}/bin/snmp_exporter_generator
.include <bsd.port.mk>