summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: db529fe01aa77a2c6ca6124cddbb9996892f6f14 (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
# Maintainer: Tucker Boniface <tucker@boniface.tech>
# Maintainer: Balazs Saros <balazs.saros@gmail.com>
# Contributor: Mice Papai <qwhexz@gmail.com>
pkgname="cli-typer-git"
_pkgname="cli-typer"
pkgver=r59.0291743
pkgrel=1
pkgdesc="Practice touch typing in the commandline and measure your skills (development version)"
arch=('any')
url="https://github.com/balzss/cli-typer"
license=('GPL')
options=('!strip' '!emptydirs')
makedepends=('git' 'npm')
source=("git+https://github.com/balzss/cli-typer")
md5sums=("SKIP")

pkgver() {
  cd "$srcdir/$_pkgname"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package() {
  cd $srcdir/$_pkgname
  npm install -g --cache "${srcdir}/npm-cache" --user root --prefix "$pkgdir"/usr
  find "${pkgdir}"/usr -type d -exec chmod 755 {} +
}