summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fbf3240bb383041cffc0641ff2dbd07abf85ee0d (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
# Maintainer: Kevin MacMartin <prurigro at gmail dot com>

_pkgname=cheat
pkgname=$_pkgname-bash-git
pkgver=20180918.r41.51a68c4
pkgrel=1
pkgdesc='A Bash reimplementation of a command line tool to create and view interactive cheatsheets'
url='https://github.com/jahendrie/cheat'
license=('GPL3')
arch=('any')
depends=('bash')
makedepends=('git')
source=("git+$url")
sha512sums=('SKIP')
conflicts=("$_pkgname-git")

pkgver() {
  cd $_pkgname
  printf "%s.r%s.%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd $_pkgname
  install -Dm755 src/$_pkgname.sh "$pkgdir/usr/bin/$_pkgname"
  install -Dm644 doc/$_pkgname.1.gz "$pkgdir/usr/share/man/man1/$_pkgname.1.gz"
  install -d "$pkgdir//usr/share/$_pkgname"
  cp -R data/* "$pkgdir/usr/share/$_pkgname/"
}