summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8aa500ac9255af45a5d7f0ebb0f99144ebc8b529 (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
# Maintainer: Philip K Gisslow <ripxorip@gmail.com>

pkgname="kbd_stats-git"
_pkgname="kbd_stats"
pkgver=0.1.0.47.g09d9a8f
pkgrel=1
pkgdesc="A tool to log/measure keyboard metrics"
arch=("i686" "x86_64" "arm" "aarch64")
url="https://github.com/ripxorip/kbd_stats"
license=("MIT" "Apache")
depends=()
makedepends=("rust" "cargo" "git")
provides=("kbd_stats")
conflicts=("kbd_stats")
source=("$_pkgname::git+https://github.com/ripxorip/kbd_stats.git")
sha256sums=("SKIP")

pkgver() {
    cd "$_pkgname"
    echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

build() {
    cd $_pkgname
    cargo build --release --locked
}

check() {
    cd $_pkgname
    cargo test --release --locked
}

package() {
    cd "$srcdir/$_pkgname"
    install -Dm755 target/release/$_pkgname "$pkgdir/usr/bin/$_pkgname"
}