Date: Thu, 1 Feb 2018 21:54:26 +0000 (UTC) From: Brad Davis <brd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460640 - head/net-mgmt/prometheus Message-ID: <201802012154.w11LsQN4099941@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brd Date: Thu Feb 1 21:54:26 2018 New Revision: 460640 URL: https://svnweb.freebsd.org/changeset/ports/460640 Log: net-mgmt/prometheus: Fix build info PR: 225430 Submitted by: David O'Rourke <dor.bsd@xm0.uk> Approved by: ports@ecadlabs.com (maintainer) Modified: head/net-mgmt/prometheus/Makefile Modified: head/net-mgmt/prometheus/Makefile ============================================================================== --- head/net-mgmt/prometheus/Makefile Thu Feb 1 21:53:37 2018 (r460639) +++ head/net-mgmt/prometheus/Makefile Thu Feb 1 21:54:26 2018 (r460640) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802012154.w11LsQN4099941>