1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/net/nsq/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

61 lines
1.7 KiB
Makefile

# $FreeBSD$
PORTNAME= nsq
PORTVERSION= 1.1.0
DISTVERSIONPREFIX= v
CATEGORIES= net
MAINTAINER= jhixson@FreeBSD.org
COMMENT= Realtime distributed messaging platform
LICENSE= MIT
ONLY_FOR_ARCHS= amd64
USES= compiler go
USE_RC_SUBR= nsqd nsqlookupd nsqadmin
USE_GITHUB= yes
GH_ACCOUNT= nsqio
GH_SUBDIR= src/github.com/nsqio/nsq
GH_TUPLE= BurntSushi:toml:2dff111:toml/src/github.com/BurntSushi/toml \
bitly:go-hostpool:a3a6125:go_hostpool/src/github.com/bitly/go-hostpool \
bitly:timer_metrics:afad179:timer_metrics/src/github.com/bitly/timer_metrics \
blang:semver:9bf7bff:semver/src/github.com/blang/semver \
bmizerany:perks:6cb9d9d:perks/src/github.com/bmizerany/perks \
golang:snappy:d9eb7a3:snappy/src/github.com/golang/snappy \
judwhite:go-svc:63c1240:go_svc/src/github.com/judwhite/go-svc \
julienschmidt:httprouter:6aacfd5:httprouter/src/github.com/julienschmidt/httprouter \
mreiferson:go-options:77551d2:go_options/src/github.com/mreiferson/go-options \
nsqio:go-diskqueue:0681a1a:go_diskqueue/src/github.com/nsqio/go-diskqueue \
nsqio:go-nsq:a53d495:go_nsq/src/github.com/nsqio/go-nsq
TARGETS= nsqd nsqlookupd nsqadmin nsq_to_nsq nsq_to_file \
nsq_to_http nsq_tail nsq_stat to_nsq
.for _t in ${TARGETS}
build-${_t}:
cd ${GO_WRKSRC}/apps/${_t}; \
${SETENV} ${MAKE_ENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build \
-ldflags "-X main.GitDescribe=${DISTVERSIONFULL}" -o bin/${_t}
install-${_t}:
${INSTALL_PROGRAM} ${GO_WRKSRC}/apps/${_t}/bin/${_t} \
${STAGEDIR}${PREFIX}/bin/${_t}
build_targets+= build-${_t}
install_targets+= install-${_t}
.endfor
do-build: ${build_targets}
do-install: ${install_targets}
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == clang
BUILD_ENV= CC=clang
.endif
.include <bsd.port.post.mk>