blob: 18bf3121a17667b4f3a17cdfe289f1a5cb1c8f96 (
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
41
42
43
|
# Contributor: Doug Newgard <dnewgard at outlook dot com>
# Contributor: James P. Harvey <jamespharvey20 at gmail dot com>
# Contributor: Christoph Bayer <chrbayer@criby.de>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Fredy GarcĂa <frealgagu at gmail dot com>
pkgname=mongodb-tools
pkgver=100.10.0
pkgrel=1
epoch=1
pkgdesc="Import, export, and diagnostic tools for MongoDB"
arch=('x86_64')
url="https://github.com/mongodb/mongo-tools"
license=('Apache-2.0' 'BSD-2-Clause' 'BSD-3-Clause' 'ISC' 'MIT' 'MPL-2.0')
depends=('glibc' 'krb5')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/mongodb/mongo-tools/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('215febf00ef78c9368ca42b262eda9a2a245b15c571eebc7a00bba54e61dd39c')
prepare() {
# Patch version check for release
sed -e "s/runCmd.*get-version.*/\"$pkgver\", *new(error)/" \
-e "s/git\.SHA1(ctx)/\"release\", *new(error)/" \
-e "/github.com\/craiggwilson\/goke\/pkg\/git/d" \
-i mongo-tools-$pkgver/buildscript/build.go
}
build() {
cd mongo-tools-$pkgver
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go run build.go build
}
package() {
install -Dm755 mongo-tools-$pkgver/bin/* -t "$pkgdir/usr/bin/"
install -Dm644 mongo-tools-$pkgver/THIRD-PARTY-NOTICES -t "$pkgdir/usr/share/licenses/$pkgname"
}
|