# Contributor: Marc Vertes # Maintainer: Mikael Jenkler pkgname=mongodb-tools pkgver=100.7.3 pkgrel=2 pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities." url="https://github.com/mongodb/mongo-tools" arch="all !s390x !riscv64" # rv64 hangs license="Apache-2.0" makedepends=" go krb5-dev " source="$pkgname-$pkgver.tar.gz::https://github.com/mongodb/mongo-tools/archive/$pkgver.tar.gz" builddir="$srcdir/mongo-tools-$pkgver" options="!check" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { mkdir -p bin local bins=" bsondump mongodump mongoexport mongofiles mongoimport mongorestore mongostat mongotop " for bin in $bins; do go build -o bin/$bin \ -ldflags="-X main.VersionStr=$pkgver -X main.GitCommit=alpine" \ -tags "ssl sasl gssapi failpoints" \ $bin/main/$bin.go done } package() { install -Dm755 -t "$pkgdir"/usr/bin bin/* } sha512sums=" 45624be91cdcdd4f5cdccedc66ba854eb7569a0b8a305b6ccc697d98ba4a4342821962fac7cff77451ebb11381d6855625dddbccd72a801008b9ba00d91f938d mongodb-tools-100.7.3.tar.gz "