diff options
| author | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-09-08 12:24:20 +0000 |
|---|---|---|
| committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-09-08 12:24:20 +0000 |
| commit | 7da99c8d614b83d46c28e52294ecde949e2cb0b9 (patch) | |
| tree | 1ba213ffb872aafc0ac65029b86a568737788346 /sysutils/consul-replicate | |
| parent | 96a9e883c77bdfd2851ccbc96a9c147f25bf04a9 (diff) | |
Notes
Diffstat (limited to 'sysutils/consul-replicate')
| -rw-r--r-- | sysutils/consul-replicate/Makefile | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/sysutils/consul-replicate/Makefile b/sysutils/consul-replicate/Makefile index 9b319655ec59..bb881fc72cea 100644 --- a/sysutils/consul-replicate/Makefile +++ b/sysutils/consul-replicate/Makefile @@ -11,13 +11,17 @@ COMMENT= Consul cross-DC KV replication daemon LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= fails to build - -USES= compiler go +USES= go USE_GITHUB= yes GH_ACCOUNT= hashicorp -GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} + +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} +GO_BUILDFLAGS= -ldflags="\ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.Version=${PORTVERSION} \ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitCommit=675a2c2 \ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitDescribe=v${PORTVERSION} \ + " USE_RC_SUBR= consul-replicate @@ -26,29 +30,4 @@ PLIST_FILES= bin/${PORTNAME} USERS= consul GROUPS= consul -post-extract: - @${MV} ${WRKSRC}/vendor/ ${WRKSRC}/src/ - -do-build: - @cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}; \ - ${SETENV} CGO_ENABLED=0 ${BUILD_ENV} ${MAKE_ENV} GOPATH=${WRKSRC} \ - go build -v -x -ldflags "\ - -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.Version=${PORTVERSION} \ - -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitCommit=675a2c2 \ - -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitDescribe=v${PORTVERSION} \ - " -o bin/${PORTNAME} - -do-install: - ${INSTALL_PROGRAM} \ - ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME} \ - ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - -.include <bsd.port.pre.mk> - -# golang assumes that if clang is in use, it is called "clang" and not "cc". If -# it's called "cc", go fails. -.if ${COMPILER_TYPE} == clang -BUILD_ENV= CC=clang -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> |
