# Contributor: Marc Vertes # Maintainer: Marc Vertes pkgname=mongodb-tools pkgver=4.2.1 pkgrel=0 pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities." url="https://github.com/mongodb/mongo-tools" arch="all !s390x" license="Apache-2.0" makedepends="$depends_dev go cyrus-sasl-dev openssl-dev libpcap-dev bash perl" options="!check" source="$pkgname-$pkgver.tar.gz::https://github.com/mongodb/mongo-tools/archive/r$pkgver.tar.gz fix-build.patch " builddir="$srcdir/src/github.com/mongodb/mongo-tools" prepare() { mkdir -p "${builddir%/*}" mv "$srcdir"/mongo-tools-r$pkgver "$builddir" default_prepare } build() { GOROOT=/usr/lib/go GOPATH="$srcdir" ./build.sh sasl ssl } package() { cd "$builddir/bin" local bindir="$pkgdir/usr/bin" mkdir -p "$bindir" cp bsondump mongostat mongofiles mongoexport mongoimport \ mongorestore mongodump mongotop mongoreplay \ "$bindir" } sha512sums="bba754acd9e21f8f832fc2e434720347c2222897b2af08d66f9491110d5491f5475ae2118ff25b263606677da10b0c96b76cc507a01287180096c25c1eab5ced mongodb-tools-4.2.1.tar.gz 74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404 fix-build.patch"