73386a73b4
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)
47 lines
1 KiB
Makefile
47 lines
1 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= minio-client
|
|
PORTVERSION= ${GH_TAGNAME:S/RELEASE.//:S/Z//:S/T/-/:S/-/./g}
|
|
PORTREVISION= 1
|
|
CATEGORIES= www
|
|
|
|
MAINTAINER= jhixson@gmail.com
|
|
COMMENT= Replacement for ls, cp, mkdir, diff and rsync commands for filesystems
|
|
|
|
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
|
|
GH_TAGNAME= RELEASE.2017-02-06T20-16-19Z
|
|
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/${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/${MC}
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/bin/${MC} \
|
|
${STAGEDIR}${PREFIX}/bin/${MC}
|
|
|
|
.include <bsd.port.mk>
|