summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4bbbb2e71d2afdfa38b3c6f3ee6db9da9df77a03 (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
# Maintainer: Danilo Bargen <aur at dbrgn dot ch>
pkgname=tealdeer-git
_name=tealdeer
pkgver=r86.9779707
pkgrel=1
pkgdesc="A fast TLDR client written in Rust."
arch=('x86_64' 'i686')
url="https://github.com/dbrgn/tealdeer"
license=('MIT', 'Apache')
depends=('')
makedepends=('git' 'rust' 'cargo')
provides=('tldr')
conflicts=('tldr-rs', 'tldr-rs-git', 'nodejs-tldr', 'nodejs-tldr-git', 'tldr-cpp-client', 'tldr-git')
options=(!emptydirs)
source=('git+https://github.com/dbrgn/tealdeer')
md5sums=('SKIP')

build() {
  cd "$srcdir/$_name"
  cargo build --release
}

package() {
  cd "$srcdir/$_name"
  mkdir -p $pkgdir/usr/bin
  install -o root -g root -m 755 target/release/tldr $pkgdir/usr/bin
}

pkgver() {
  cd "$srcdir/$_name"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# vim:set ts=2 sw=2 et: