summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e1efc4781ee0c086bbdd6bc54c764f44a9e91137 (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
44
# Maintainer :  Kr1ss $(echo \<kr1ss+x-yandex+com\>|sed s/\+/./g\;s/\-/@/)
# Contributor : Wesley Moore <wes@wezm.net>


pkgname=mdcat-bin
_pkgname="${pkgname%-bin}"

pkgver=0.21.1
pkgrel=1

pkgdesc='Sophisticated Markdown rendering for the terminal'
arch=('x86_64')
url="https://github.com/lunaryorn/$_pkgname"
license=('MPL2')

provides=("$_pkgname")
conflicts=("$_pkgname")

makedepends=('curl')
optdepends=('curl: fetch images via http/https'
            'terminology: optional terminal emulator for image support'
            'kitty: optional terminal emulator for image support'
            'librsvg: render svg images in kitty')

changelog=CHANGELOG.md
_srcname="$_pkgname-$pkgver-x86_64-unknown-linux-musl"
source=("$url/releases/download/$_pkgname-$pkgver/$_srcname.tar.gz")
b2sums=($(curl -sL "$url/releases/download/$_pkgname-$pkgver/B2SUMS.txt" | \
           grep "$_srcname" | cut -d\  -f1))


package() {
  cd "$_srcname"
  install -Dm644 {README,CHANGELOG}.md        -t"$pkgdir/usr/share/doc/$_pkgname/"
  install -Dm644 "completions/_$_pkgname"     -t"$pkgdir/usr/share/zsh/site-functions/"
  install -Dm644 "completions/$_pkgname.fish" -t"$pkgdir/usr/share/fish/vendor_completions.d/"
  install -Dm644 "completions/$_pkgname.bash"   "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
  install -Dm755 "$_pkgname"                  -t"$pkgdir/usr/bin/"
  # If run as `mdless`, mdcat uses "$PAGER" (like `mdcat -p`), so let's hardlink mdless to mdcat :
  cp -l "$pkgdir"/usr/bin/md{cat,less}
}


# vim: ts=2 sw=2 et ft=PKGBUILD: