This port currently installs as minio-client, which is a bit long.
Also, most examples of usage show mc. I intentionally used minio-client to avoid a naming collision with mc (midnight commander). I would like to give users the option to install as mc if desired. PR: ports/217858 Submitted by: John Hixson <jhixson@gmail.com> (maintainer)
This commit is contained in:
parent
a72db71b71
commit
73386a73b4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=436693
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= minio-client
|
||||
PORTVERSION= ${GH_TAGNAME:S/RELEASE.//:S/Z//:S/T/-/:S/-/./g}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www
|
||||
|
||||
MAINTAINER= jhixson@gmail.com
|
||||
@ -12,6 +13,18 @@ LICENSE= APACHE20
|
||||
BUILD_DEPENDS= go>=1.7:lang/go \
|
||||
bash:shells/bash
|
||||
|
||||
OPTIONS_DEFINE= MC
|
||||
|
||||
MC_DESC= Install as mc
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MMC}
|
||||
MC= mc
|
||||
.else
|
||||
MC= ${PORTNAME}
|
||||
.endif
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= minio
|
||||
GH_PROJECT= mc
|
||||
@ -20,15 +33,15 @@ GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${GH_PROJECT}
|
||||
MAKE_ENV= GOPATH=${WRKSRC} GOROOT=${LOCALBASE}/go
|
||||
|
||||
STRIP= # stripping can break go binaries
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
PLIST_FILES= bin/${MC}
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}; \
|
||||
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x \
|
||||
-ldflags "-X main.GitDescribe=v${PORTVERSION}" -o bin/${PORTNAME}
|
||||
-ldflags "-X main.GitDescribe=v${PORTVERSION}" -o bin/${MC}
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/bin/${PORTNAME} \
|
||||
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/bin/${MC} \
|
||||
${STAGEDIR}${PREFIX}/bin/${MC}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user