freebsd-ports/databases/go-carbon/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

37 lines
1.1 KiB
Makefile

# $FreeBSD$
PORTNAME= go-carbon
DISTVERSIONPREFIX= v
DISTVERSION= 0.12.0
PORTREVISION= 2
CATEGORIES= databases
MAINTAINER= a.andersson.thn@gmail.com
COMMENT= Go implementation of carbon
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.md
USES= go
USE_GITHUB= yes
GH_ACCOUNT= lomik
USE_RC_SUBR= ${PORTNAME}
USERS= carbon
GROUPS= carbon
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC}/_vendor \
go build --ldflags '-X main.BuildVersion=${DISTVERSION}' github.com/lomik/go-carbon
do-install:
@${MKDIR} ${STAGEDIR}/var/db/go-carbon
@${MKDIR} ${STAGEDIR}/var/log/go-carbon
@${MKDIR} ${STAGEDIR}/${PREFIX}/etc/go-carbon
${INSTALL_PROGRAM} ${WRKSRC}/go-carbon ${STAGEDIR}${PREFIX}/bin/
${INSTALL_DATA} ${WRKSRC}/deploy/go-carbon.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/go-carbon.conf.sample
${INSTALL_DATA} ${WRKSRC}/deploy/storage-aggregation.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/storage-aggregation.conf.sample
${INSTALL_DATA} ${WRKSRC}/deploy/storage-schemas.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/storage-schemas.conf.sample
.include <bsd.port.mk>