summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63d53c3b4d232e3432d5120e0cbe059b09d3dbf3 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Dan Beste <dan.ray.beste@gmail.com>

# TODO
#   1. Firejail profile + script

pkgname=rust-doom-git
reponame=rust-doom
execname=rs_doom
pkgver=r323.40f22ca
pkgrel=1
pkgdesc='A little Doom 1 & 2 Renderer written in Rust.'
arch=(
    'i686'
    'x86_64'
)
url='https://github.com/cristicbz/rust-doom'
license=(
    'Apache'
)
depends_x86_64=(
    'sdl2'
    'sdl2_ttf'
)
depends_i686=(
    'lib32-sdl2'
    'lib32-sdl2_ttf'
)
makedepends=(
    'cargo'
    'git'
    'rust'
)
provides=(
    "${execname}"
)
conflicts=(
    "${execname}"
)
source=(
    'git+https://github.com/cristicbz/rust-doom.git'
)
sha256sums=(
    'SKIP'
)

pkgver() {
	cd "${srcdir}/${reponame}" || exit 1
	printf "r%s.%s"                     \
        "$(git rev-list --count HEAD)"  \
        "$(git rev-parse --short HEAD)"
}

build() {
	cd "${srcdir}/${reponame}" || exit 1
	cargo build --release
}

package() {
	cd "${srcdir}/${reponame}" || exit 1
    install -m755   \
        -D "target/release/${execname}" "${pkgdir}/usr/bin/${execname}"
    install -m644   \
        -D "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}