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

_pkgname=cheat
pkgname=${_pkgname}-bash-git
pkgver=20150619.r30.2590d05
pkgrel=1
pkgdesc="A Bash reimplementation of a command line tool to create and view interactive cheatsheets"
url="https://github.com/jahendrie/${_pkgname}"
license=('GPL3')
arch=('any')
depends=('bash')
makedepends=('git')
source=("git://github.com/jahendrie/${_pkgname}.git#branch=master")
sha512sums=('SKIP')

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}/"
}