blob: 75ed690721900e0de72fbe9924c6f1ebb30a47ff (
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.11.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=('1d3e6f9b83ded015300fc77b739d19d97afc50ec79d20854459eb2841713ffd0')
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"
}
|