2018-12-15 22:12:18 +01:00
|
|
|
# $NetBSD: Makefile,v 1.16 2018/12/15 21:12:19 wiz Exp $
|
2015-10-21 18:37:22 +02:00
|
|
|
|
2017-05-03 18:49:54 +02:00
|
|
|
DISTNAME= mongo-tools-3.4.4
|
2018-06-12 19:50:20 +02:00
|
|
|
PKGREVISION= 1
|
2015-10-21 18:37:22 +02:00
|
|
|
CATEGORIES= databases
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=mongodb/}
|
|
|
|
|
2018-12-15 22:12:18 +01:00
|
|
|
MAINTAINER= fhajny@NetBSD.org
|
2017-07-31 00:32:10 +02:00
|
|
|
HOMEPAGE= https://github.com/mongodb/mongo-tools/
|
2015-10-21 18:37:22 +02:00
|
|
|
COMMENT= MongoDB CLI tools
|
|
|
|
LICENSE= apache-2.0
|
|
|
|
|
|
|
|
GITHUB_TAG= r${PKGVERSION_NOREV}
|
|
|
|
|
2018-09-22 22:41:38 +02:00
|
|
|
BUILD_DEPENDS+= ${GO_PACKAGE_DEP}
|
2015-10-21 18:37:22 +02:00
|
|
|
|
|
|
|
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 \
|
2018-07-08 15:54:39 +02:00
|
|
|
${GO} build -tags "${MONGO_TAGS}" -o bin/${tool} ${tool}/main/${tool}.go
|
2015-10-21 18:37:22 +02:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
.for tool in ${MONGO_TOOLS}
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/${tool} ${DESTDIR}${PREFIX}/bin/${tool}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include "../../lang/go/version.mk"
|
2018-07-08 15:54:39 +02:00
|
|
|
.include "../../devel/go-sys/buildlink3.mk"
|
2015-10-21 18:37:22 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|