[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / databases / mongo-tools

File: [cvs.NetBSD.org] / pkgsrc / databases / mongo-tools / Makefile (download)

Revision 1.12, Sun Jul 30 22:32:11 2017 UTC (6 years, 7 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3
Changes since 1.11: +2 -2 lines

Switch github HOMEPAGEs to https.

# $NetBSD: Makefile,v 1.12 2017/07/30 22:32:11 wiz Exp $

DISTNAME=	mongo-tools-3.4.4
CATEGORIES=	databases
MASTER_SITES=	${MASTER_SITE_GITHUB:=mongodb/}

MAINTAINER=	filip@joyent.com
HOMEPAGE=	https://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 "../../devel/go-sys/buildlink3.mk"
.include "../../lang/go/version.mk"
.include "../../mk/bsd.pkg.mk"