aboutsummaryrefslogtreecommitdiffstats
path: root/community/mongodb-tools/APKBUILD
blob: c6b3f42df04bb23eb1cbcc4b6ddf6616419519d5 (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
# Contributor: Marc Vertes <mvertes@free.fr>
# Maintainer: Marc Vertes <mvertes@free.fr>
pkgname=mongodb-tools
pkgver=4.2.3
pkgrel=1
pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities."
url="https://github.com/mongodb/mongo-tools"
arch="all !s390x !mips !mips64"
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="772719b450f8b656c22ac0126fee1e0fa58b5320c94ac6414b1d9af13e6437393c2482f2e386f4a73c84a2d1bfe0ea88df117a6a7ae87f4884477505cf662585  mongodb-tools-4.2.3.tar.gz
74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404  fix-build.patch"