3726f94254
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
38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= grpcurl
|
|
DISTVERSIONPREFIX= v
|
|
DISTVERSION= 0.1.0
|
|
CATEGORIES= net
|
|
|
|
MAINTAINER= seanc@FreeBSD.org
|
|
COMMENT= Command-line tool that lets you interact with gRPC servers
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
USES= go
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= fullstorydev
|
|
GH_SUBDIR= src/github.com/fullstorydev/grpcurl
|
|
GH_TAGNAME= ca5693f
|
|
GH_TUPLE= golang:protobuf:c65a041:jsonpb/src/github.com/golang/protobuf \
|
|
jhump:protoreflect:5cc2142:protoreflect/src/github.com/jhump/protoreflect \
|
|
golang:net:5f9ae10:net/src/golang.org/x/net \
|
|
grpc:grpc-go:4172bfc:grpcgo/src/google.golang.org/grpc \
|
|
golang:text:7922cc4:text/src/golang.org/x/text \
|
|
google:go-genproto:7fd901a:gogenproto/src/google.golang.org/genproto
|
|
|
|
PLIST_FILES= bin/grpcurl
|
|
|
|
do-build:
|
|
cd ${WRKSRC}/cmd/${PORTNAME} && ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \
|
|
${LOCALBASE}/bin/go build -ldflags "-X main.version=${DISTVERSIONPREFIX}${PORTVERSION} -s -w" \
|
|
-o ${PORTNAME}
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/fullstorydev/grpcurl/cmd/${PORTNAME}/${PORTNAME} \
|
|
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
|
|
|
.include <bsd.port.mk>
|