diff options
author | fhajny <fhajny@pkgsrc.org> | 2015-10-21 16:37:22 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2015-10-21 16:37:22 +0000 |
commit | a3916c6ab1e61dab1610ba33dadcac185a03bb9d (patch) | |
tree | 3b6576f21748435a5c117b9fd123d5b915dc7da5 /databases/mongo-tools/Makefile | |
parent | 32dc3e041b809809e8bc724b9df954c91d09c9fd (diff) | |
download | pkgsrc-a3916c6ab1e61dab1610ba33dadcac185a03bb9d.tar.gz |
Import mongo-tools 3.0.7 as databases/mongo-tools.
MongoDB command line tools, no longer included with the official
MongoDB distribution tarball (since 3.0).
Diffstat (limited to 'databases/mongo-tools/Makefile')
-rw-r--r-- | databases/mongo-tools/Makefile | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/databases/mongo-tools/Makefile b/databases/mongo-tools/Makefile new file mode 100644 index 00000000000..4ae6fd085b0 --- /dev/null +++ b/databases/mongo-tools/Makefile @@ -0,0 +1,48 @@ +# $NetBSD: Makefile,v 1.1 2015/10/21 16:37:22 fhajny Exp $ + +DISTNAME= mongo-tools-3.0.7 +CATEGORIES= databases +MASTER_SITES= ${MASTER_SITE_GITHUB:=mongodb/} + +MAINTAINER= filip@joyent.com +HOMEPAGE= http://github.com/mongodb/mongo-tools/ +COMMENT= MongoDB CLI tools +LICENSE= apache-2.0 + +GITHUB_TAG= r${PKGVERSION_NOREV} + +BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go + +EXTRACT_USING= bsdtar +USE_TOOLS+= pkg-config + +.include "options.mk" + +MONGO_TOOLS= bsondump mongostat mongofiles mongoexport mongoimport \ + mongorestore mongodump mongotop mongooplog + +# go uses volatile /tmp dirs that contain required includes files too +BUILDLINK_PASSTHRU_DIRS+= /tmp + +INSTALLATION_DIRS+= bin + +post-extract: + ${MKDIR} -p ${WRKSRC}/vendor/src/github.com/mongodb/mongo-tools +.for tool in common ${MONGO_TOOLS} + ${LN} -s ${WRKSRC}/${tool} ${WRKSRC}/vendor/src/github.com/mongodb/mongo-tools/${tool} +.endfor + +do-build: +.for tool in ${MONGO_TOOLS} + cd ${WRKSRC} && \ + ${SETENV} GOPATH=${WRKSRC}:${WRKSRC}/vendor:${PREFIX}/gopkg \ + go build -tags "${MONGO_TAGS}" -o bin/${tool} ${tool}/main/${tool}.go +.endfor + +do-install: +.for tool in ${MONGO_TOOLS} + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${tool} ${DESTDIR}${PREFIX}/bin/${tool} +.endfor + +.include "../../lang/go/version.mk" +.include "../../mk/bsd.pkg.mk" |