diff options
Diffstat (limited to 'non-free/mongodb-tools')
-rw-r--r-- | non-free/mongodb-tools/APKBUILD | 38 | ||||
-rw-r--r-- | non-free/mongodb-tools/fix-build.patch | 13 |
2 files changed, 51 insertions, 0 deletions
diff --git a/non-free/mongodb-tools/APKBUILD b/non-free/mongodb-tools/APKBUILD new file mode 100644 index 0000000000..a9b93677b7 --- /dev/null +++ b/non-free/mongodb-tools/APKBUILD @@ -0,0 +1,38 @@ +# Contributor: Marc Vertes <mvertes@free.fr> +# Maintainer: Marc Vertes <mvertes@free.fr> +pkgname=mongodb-tools +pkgver=4.0.6 +pkgrel=0 +pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities." +url="https://github.com/mongodb/mongo-tools" +arch="all !s390x !aarch64" +license="Apache" +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() { + cd "$builddir" + 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="d6185d7442a593d29db78889c55aba53e070bedd522d78d8c0bf52bb27f26c5fee6d010457f65774ea36a2e6d5280f38c95433ff76ed53ed9d74b1c811198cb7 mongodb-tools-4.0.6.tar.gz +74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404 fix-build.patch" diff --git a/non-free/mongodb-tools/fix-build.patch b/non-free/mongodb-tools/fix-build.patch new file mode 100644 index 0000000000..4913d8caa6 --- /dev/null +++ b/non-free/mongodb-tools/fix-build.patch @@ -0,0 +1,13 @@ +--- mongo-tools-r3.4.3/build.sh.orig ++++ mongo-tools-r3.4.3/build.sh +@@ -7,8 +7,8 @@ + fi + + # make sure we're in the directory where the script lives +-SCRIPT_DIR="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)" +-cd $SCRIPT_DIR ++#SCRIPT_DIR="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)" ++#cd $SCRIPT_DIR + + sed -i.bak -e "s/built-without-version-string/$(git describe)/" \ + -e "s/built-without-git-spec/$(git rev-parse HEAD)/" \ |