diff options
author | brd <brd@FreeBSD.org> | 2018-02-02 05:54:26 +0800 |
---|---|---|
committer | brd <brd@FreeBSD.org> | 2018-02-02 05:54:26 +0800 |
commit | 937323ae29a6a012fbca9a61333261d917b0ac3d (patch) | |
tree | 0f836cfb4fb12c685b1e6d50560a22583a32ec5a /net-mgmt | |
parent | 530ea2148d8a3459cdf7fa274554ec9fe02794ef (diff) | |
download | freebsd-ports-gnome-937323ae29a6a012fbca9a61333261d917b0ac3d.tar.gz freebsd-ports-gnome-937323ae29a6a012fbca9a61333261d917b0ac3d.tar.zst freebsd-ports-gnome-937323ae29a6a012fbca9a61333261d917b0ac3d.zip |
net-mgmt/prometheus: Fix build info
PR: 225430
Submitted by: David O'Rourke <dor.bsd@xm0.uk>
Approved by: ports@ecadlabs.com (maintainer)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/prometheus/Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net-mgmt/prometheus/Makefile b/net-mgmt/prometheus/Makefile index d63b8e5c4013..d3f3163a80d8 100644 --- a/net-mgmt/prometheus/Makefile +++ b/net-mgmt/prometheus/Makefile @@ -3,6 +3,7 @@ PORTNAME= prometheus PORTVERSION= 1.8.2 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= net-mgmt @@ -22,13 +23,20 @@ USE_RC_SUBR= prometheus USERS= prometheus GROUPS= prometheus -LD_FLAG_STRING= ${GO_PKGNAME}/vendor/github.com/prometheus/common/version. +BUILD_USER?= ${USER} +LD_FLAG_X_PREFIX= -X ${GO_PKGNAME}/vendor/github.com/prometheus/common/version +LD_FLAG_STRING= -s \ + ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \ + ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \ + ${LD_FLAG_X_PREFIX}.Branch=release-${PORTVERSION:R} \ + ${LD_FLAG_X_PREFIX}.BuildUser=${BUILD_USER} + do-build: - (cd ${GO_WRKSRC}/cmd/prometheus ; ${SETENV} ${GO_ENV} go install -ldflags \ - "-s -X ${LD_FLAG_STRING}.Version=${PORTVERSION}") + ( cd ${GO_WRKSRC}/cmd/prometheus ; \ + ${SETENV} ${GO_ENV} go install -ldflags "${LD_FLAG_STRING}" ) - (cd ${GO_WRKSRC}/cmd/promtool ; ${SETENV} ${GO_ENV} go install -ldflags \ - "-s -X ${LD_FLAG_STRING}.Version=${PORTVERSION}") + ( cd ${GO_WRKSRC}/cmd/promtool ; \ + ${SETENV} ${GO_ENV} go install -ldflags "${LD_FLAG_STRING}" ) do-install: ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/prometheus ${STAGEDIR}${PREFIX}/bin |