mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-02 02:52:46 +02:00
56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
# Contributor: Marc Vertes <marc.vertes@ugrid.net>
|
|
# Maintainer: Marc Vertes <marc.vertes@ugrid.net>
|
|
pkgname=mongodb-tools
|
|
pkgver=r3.2.4
|
|
pkgrel=1
|
|
pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities."
|
|
url="https://github.com/mongodb/mongo-tools"
|
|
arch="all !aarch64"
|
|
license="apache"
|
|
depends="libsasl"
|
|
depends_dev=""
|
|
makedepends="$depends_dev go cyrus-sasl-dev libressl-dev"
|
|
install=""
|
|
subpackages=""
|
|
source="https://github.com/mongodb/mongo-tools/archive/$pkgver/$pkgname-$pkgver.tar.gz
|
|
libressl.patch
|
|
"
|
|
|
|
_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="d4ac35044dd2bf91979f25a78c69612a mongodb-tools-r3.2.4.tar.gz
|
|
8740979d526a5eb5dedb91484d36ccbd libressl.patch"
|
|
sha256sums="9d52028fb2be6a6e0a779aa73587c52ccd5fa59b258e26e5c2c3fce167599138 mongodb-tools-r3.2.4.tar.gz
|
|
09ee19045940ec86f66618e8b13769c61d83f94ca5057ecec24d171f44649b4b libressl.patch"
|
|
sha512sums="d34ad87bb2a53c9df0124c26a4c200236aa889c7a5bd09a3b535acd4b18c5757018e78813fa04b48b359004eb9097853b49fd359617e71f66e41ef71da01c222 mongodb-tools-r3.2.4.tar.gz
|
|
069c303bc52b6020d7dd5250851bca85d7cef0e6294d3dc8b7d6a45033b2f4beae1c23935fe84cfb39b75de082e2621b2f45f1501944d09a0942edc024eb2f3e libressl.patch"
|