summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a25edf5daefdefaf60f17d6b4c94d2627bd8ac54 (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: nycex <nycex / cccp.org>
_pkgbasename=axosnake
pkgname=$_pkgbasename-git
pkgrel=1
pkgver=r69.f4e09b3
pkgdesc="a snake game written in rust with quicksilver"
arch=('any')
url="https://codeberg.org/nycex/$_pkgbasename"
license=('MIT')
depends=('cargo')
source=(git+https://gitlab.com/nycex/${_pkgbasename})
sha256sums=('SKIP')

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

build() {
    cd "${srcdir}/${_pkgbasename}"
    cargo build --release
}

package() {
    cd "${srcdir}/${_pkgbasename}"

    install -D -m755 target/release/$_pkgbasename "${pkgdir}/usr/bin/$_pkgbasename"
    install -D -m644 LICENSE "${pkgdir}/usr/share/license/$_pkgbasename/LICENSE"
}