summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3b2d595280902c1c66bc111b0c8a8dab1dce25c (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
# Maintainer: Lyova Potyomkin <lyova.potyomkin@gmail.com>
pkgname='rusted-tetris-git'
pkgver='0.1.0.r3'
pkgrel='1'
pkgdesc="Terminal-based tetris clone written in pure Rust"
arch=('x86_64')
url="https://github.com/lyova-potyomkin/rusted-tetris"
license=('MIT')
makedepends=('git' 'cargo')
provides=("${pkgname%-git}")
source=("git+$url")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
    git describe --tags | sed 's/v//;s/-[^-]*$//;s/-/.r/'
}

build() {
    cd "$srcdir/${pkgname%-git}"
    cargo build --release
    strip target/release/${pkgname%-git}
}

check() {
    cd "$srcdir/${pkgname%-git}"
    cargo test --release
}

package() {
    cd "$srcdir/${pkgname%-git}"
    install -Dm 755 target/release/${pkgname%-git} -t "$pkgdir/usr/bin"
    install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
}