aboutsummaryrefslogtreecommitdiffstats
path: root/non-free/mongodb-tools/APKBUILD
blob: fb5fd2d17a4e9f8cfa272ae1e1dbb6a3dde477ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Contributor: Marc Vertes <mvertes@free.fr>
# Maintainer: Marc Vertes <mvertes@free.fr>
pkgname=mongodb-tools
pkgver=4.0.6
pkgrel=1
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-cstruct-decls.patch
	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
e95ff1c3583ad8c3c4b8f14c6743fe8a5029c91e83b78bc33eae762d1d3aa48a6536c5b27183fca81b93034f4f3d91d23fef857a1f85f725d57f3a45a599fedf  fix-cstruct-decls.patch
74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404  fix-build.patch"