summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot2020-12-15 18:26:49 +0100
committerEmmanuel Gil Peyrot2020-12-15 18:28:31 +0100
commite79f76b0b4a24f75f1ab9061e1bd91dd8a281267 (patch)
tree77d00d4f8f5104a8735a6de39a34f473b416ee6f
downloadaur-everfight-git.tar.gz
Hello world!
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD49
-rw-r--r--no-glfw-sys.patch18
3 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9f34167e5364
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = everfight-git
+ pkgdesc = Space shooter/Bullet hell made for Game Off 2020
+ pkgver = r42.c283cb7
+ pkgrel = 1
+ url = https://snoozetime.itch.io/everfight-gameoff2020
+ arch = x86_64
+ arch = aarch64
+ license = CC-BY-3.0
+ makedepends = git
+ makedepends = cargo
+ depends = glfw
+ depends = alsa-lib
+ provides = everfight
+ conflicts = everfight
+ source = git+https://github.com/SnoozeTime/spacegame
+ sha256sums = SKIP
+
+pkgname = everfight-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..249665cff8f1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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}
+}
diff --git a/no-glfw-sys.patch b/no-glfw-sys.patch
new file mode 100644
index 000000000000..729f78b57389
--- /dev/null
+++ b/no-glfw-sys.patch
@@ -0,0 +1,18 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 654cd56..6fe9588 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -8,11 +8,11 @@ default-run = "spacegame"
+
+ [dependencies]
+ luminance = "0.43"
+-luminance-glfw = "0.14"
++luminance-glfw = { version = "0.14", default-features = false, features = ["log-errors"] }
+ luminance-gl = "0.16"
+ luminance-windowing = "0.9"
+ luminance-derive = "0.6"
+-glfw = "0.41"
++glfw = { version = "0.41", default-features = false }
+ image = { version = "0.23.12", default-features = false, features = ["png"] }
+
+ # ecs