summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ae4fad4ea2a1dc0dfb86661cc19375d402b16bbf (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
# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
# Contributor: juan tascon <juantascon __at__ horlux org>

pkgname=mongodb-shell-bin
pkgver=4.4.4
basever() {
  sed 's/\.[[:digit:]]\+$//' <<< "${pkgver}"
}
pkgrel=1
pkgdesc="Mongo shell client only"
arch=("x86_64")
url="https://www.mongodb.com/"
license=("SSPLv1")
provides=("mongodb=$pkgver")
conflicts=("mongodb")
optdepends=("mongodb-tools: The MongoDB tools provide import, export, and diagnostic capabilities")
source=("https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/$(basever)/multiverse/binary-amd64/mongodb-org-shell_${pkgver}_amd64.deb" "LICENSE")
sha256sums=('2b96b2b081000c099d169cb325d09a07e554018fdef5b5362cc2f7508e58aee9'
            '09d99ca61eb07873d5334077acba22c33e7f7d0a9fa08c92734e0ac8430d6e27')

prepare() {
  cd "${srcdir}"
  mkdir -p "${srcdir}/output"
  ar x mongodb-org-shell_${pkgver}_amd64.deb
  tar -xvf "${srcdir}/data.tar.xz" -C "${srcdir}/output" #shell extracted
}

package() {
  mkdir -p "$pkgdir/usr/share/man"
  cp -r "$srcdir/output/usr/bin" "$pkgdir/usr/"
  cp -r "$srcdir/output/usr/share/man/man1" "$pkgdir/usr/share/man/"
  install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim: set tabstop=4 shiftwidth=2 expandtab: