summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b27964334c294ed542e4e9e4970534d3445a1cfc (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@protonmail.com>
_pkgbasename=axosnake
pkgname=$_pkgbasename-git
pkgrel=1
pkgver=r67.6caf3a1
pkgdesc="a snake game written in rust with quicksilver"
arch=('any')
url="https://gitlab.com/nycex/$_pkgbasename"
license=('MIT')
depends=('rust')
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"
}