Commit 6ea30a8c authored by Marc Vertes's avatar Marc Vertes Committed by Natanael Copa

testing/mongodb-tools: new aport

https://github.com/mongodb/mongo-tools
The MongoDB tools provide import, export, and diagnostic capabilities.
parent 06bb6c0c
# Contributor: Marc Vertes <marc.vertes@ugrid.net>
# Maintainer: Marc Vertes <marc.vertes@ugrid.net>
pkgname=mongodb-tools
pkgver=r3.3.1
pkgrel=0
pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities."
url="https://github.com/mongodb/mongo-tools"
arch="all"
license="apache"
depends="libsasl"
depends_dev=""
makedepends="$depends_dev go cyrus-sasl-dev openssl-dev"
install=""
subpackages=""
source="https://github.com/mongodb/mongo-tools/archive/$pkgver/$pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/mongo-tools-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
local ldflags
cd "$_builddir"
. ./set_gopath.sh
mkdir -p bin
ldflags="-X github.com/mongodb/mongo-tools/common/options.Gitspec=`git rev-parse HEAD`"
for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog
do
echo "Building $i"
go build -ldflags "$ldflags" -o "bin/$i" -tags "ssl sasl" "$i/main/$i.go"
done
}
package() {
cd "$_builddir/bin"
local bindir="$pkgdir/usr/bin"
mkdir -p "$bindir" || return 1
cp bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog "$bindir" || return 1
}
md5sums="e6ab6e8bad557df1e9b30a4a12c96acc mongodb-tools-r3.3.1.tar.gz"
sha256sums="0f1334a17621bb61a5a0621b825f1e6996d3f2144c7930ccf01a62cda144a6f1 mongodb-tools-r3.3.1.tar.gz"
sha512sums="b872fa89ab610addee6fcdebd3e8761632deea96d8fa4ad5f546028c578e7fb531c2d4f067bca2b7cb38021cae58c7dfc6a6ec57b72e70ebb77ed4cbf5f979b9 mongodb-tools-r3.3.1.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment