blob: 249665cff8f125aee1eb00b32144e312d8b586ca (
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
|
# Maintainer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
pkgname=everfight-git
pkgver=r42.c283cb7
pkgrel=1
pkgdesc='Space shooter/Bullet hell made for Game Off 2020'
arch=('x86_64' 'aarch64')
url='https://snoozetime.itch.io/everfight-gameoff2020'
license=('CC-BY-3.0')
provides=('everfight')
conflicts=('everfight')
depends=('glfw' 'alsa-lib')
makedepends=('git' 'cargo')
source=('git+https://github.com/SnoozeTime/spacegame'
'no-glfw-sys.patch')
sha256sums=('SKIP'
'57ecb5e9ac35ff1e468c47e4179fd281606aaa57fbaeedbc43a5861c30aa7834')
pkgver() {
cd spacegame
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd spacegame
sed -i '/ASSET_PATH/s,\(PathBuf::from\).*,\1("/usr/share/everfight"),' src/paths.rs
# This patch is required for Wayland support.
patch -p1 < ../no-glfw-sys.patch
cargo update
}
build() {
cd spacegame
cargo build --release --no-default-features
}
package() {
cd spacegame
cargo install --path . --bin spacegame --locked --root "$pkgdir"/usr --no-default-features
rm -f "$pkgdir"/usr/.crates.toml
rm -f "$pkgdir"/usr/.crates2.json
mv "$pkgdir"/usr/bin/spacegame "$pkgdir"/usr/bin/everfight
install -Dm644 attributions.txt "$pkgdir"/usr/share/licenses/$pkgname/attributions.txt
install -Dm644 game_readme.md "$pkgdir"/usr/share/doc/$pkgname/readme.md
cp -a assets "$pkgdir"/usr/share/${pkgname%-git}
}
|