freebsd-ports/sysutils/envconsul/Makefile
Tobias Kortkamp 3726f94254 Convert all Go ports to USES=go
This allows for port testing with lang/go-devel via GO_PORT, setting
up the Go build environment in a single place, and is step one in
simplifying Go ports that often define too complicated do-build
targets themselves.

USES=go gains new arguments 'run' to add lang/go to RUN_DEPENDS and
'no_targets' for ports with composite builds that call 'go' themselves
and do not need the do-build/do-install targets of USES=go.

PR:		238849
Submitted by:	dg@syrec.org (also D20745)
Reviewed by:	mat, tobik
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D20746
2019-06-29 03:51:13 +00:00

46 lines
1 KiB
Makefile

# $FreeBSD$
PORTNAME= envconsul
PORTVERSION= 0.7.3
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
MAINTAINER= swills@FreeBSD.org
COMMENT= Populate values from Consul into a process environment
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go
USE_GITHUB= yes
GH_ACCOUNT= hashicorp
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME}
PLIST_FILES= bin/envconsul
OPTIONS_DEFINE= DOCS
PORTDOCS= README.md
COMMIT= 7ece735
GO_LDFLAGS= -ldflags="-s -w \
-X main.Name=${PORTNAME} \
-X main.Version=${PORTVERSION} \
-X main.GitCommit=${COMMIT}"
do-build:
@cd ${WRKSRC}/src/github.com/hashicorp/envconsul; \
${SETENV} ${MAKE_ENV} ${BUILD_ENV} GOPATH=${WRKSRC} \
go build ${GO_LDFLAGS}\
-o bin/envconsul
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/envconsul/bin/envconsul ${STAGEDIR}${PREFIX}/bin/envconsul
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in ${PORTDOCS}
${CP} ${WRKSRC}/src/github.com/hashicorp/envconsul/${doc} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>