summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fcf27dde6f1f8a144f9504a761266b9e7e8ae576 (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
# Maintainer: Árni Dagur <arnidg@protonmail.ch>

pkgname="redox-games-git"
pkgver=r143.1e234c6
pkgrel=2
pkgdesc="Games for Redox OS (and Linux) in the terminal"
arch=('x86_64')
url='https://gitlab.redox-os.org/redox-os/games'
license=('MIT')
makedepends=('rust' 'cargo')
source=("$pkgname::git+$url.git")
sha512sums=('SKIP')

pkgver() {
    cd $pkgname
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

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

package() {
    cd $pkgname

    mkdir -p "$pkgdir/usr/bin"
    install -Dm755 target/release/{baduk,commie,dem,flappy,h4xx3r,ice,minesweeper,reblox,redoku,rusthello,snake} "$pkgdir/usr/bin"

    mkdir -p "$pkgdir/usr/share/license"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}