diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-23 21:32:28 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-23 21:32:28 +0200 |
commit | 15fd9633e724799a7c29ac592e732c6df1fec50e (patch) | |
tree | 13f07f319347fc6d161d52b6757b349153a327f7 | |
parent | ed27e081bc71b0ab7d9deb94313e1d875b96245f (diff) | |
download | pkgbuilds-15fd9633e724799a7c29ac592e732c6df1fec50e.tar pkgbuilds-15fd9633e724799a7c29ac592e732c6df1fec50e.tar.bz2 pkgbuilds-15fd9633e724799a7c29ac592e732c6df1fec50e.tar.zst |
standalone files git
-rw-r--r-- | gnix-git/PKGBUILD | 2 | ||||
-rw-r--r-- | hurrycurry-standalone-files-git/PKGBUILD | 110 |
2 files changed, 111 insertions, 1 deletions
diff --git a/gnix-git/PKGBUILD b/gnix-git/PKGBUILD index ea11868..ecf8d65 100644 --- a/gnix-git/PKGBUILD +++ b/gnix-git/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: metamuffin <metamuffin@disroot.org> pkgname=gnix-git -pkgver=r161.56be838 +pkgver=r162.f4042f7 pkgrel=1 pkgdesc="a simple stupid http reverse proxy" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') diff --git a/hurrycurry-standalone-files-git/PKGBUILD b/hurrycurry-standalone-files-git/PKGBUILD new file mode 100644 index 0000000..31e7dd1 --- /dev/null +++ b/hurrycurry-standalone-files-git/PKGBUILD @@ -0,0 +1,110 @@ +# Maintainer: metamuffin <metamuffin@disroot.org> + +pkgname=hurrycurry-standalone-files-git +pkgver=r2221.be699e7a +pkgrel=1 +pkgdesc="A game about cooking (standalone files (git))" +arch=('any') +url="https://codeberg.org/hurrycurry/hurrycurry" +license=('AGPL3') +makedepends=( + 'rustup' + 'deno' + 'graphviz' + 'godot' + 'esbuild' + 'typst' + 'mingw-w64-gcc' + 'mingw-w64-binutils' + 'lib32-rust-libs' +) +source=("git+https://codeberg.org/hurrycurry/hurrycurry.git") +sha256sums=('SKIP') + +_targets=( + "x86_64-unknown-linux-gnu" + "aarch64-unknown-linux-gnu" + # "armv7-unknown-linux-gnueabi" + "i686-unknown-linux-gnu" + "x86_64-pc-windows-gnu" + "i686-pc-windows-gnu" + "aarch64-linux-android" + "armv7-linux-androideabi" + "i686-linux-android" + "x86_64-linux-android" +) + +_target_suf() { + if echo "$t" | grep -q android; then + echo -n ".apk" + elif echo "$t" | grep -q windows; then + echo -n ".exe" + fi +} + +pkgver() { + cd "hurrycurry" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +prepare() { + cd "hurrycurry" + rustup default nightly + for t in "${_targets[@]}"; do + rustup target add --toolchain "$(cat rust-toolchain)" "$t" + cargo fetch --locked --target "$t" + done +} +build() { + # this might be useful: + # > ln -s /usr/x86_64-w64-mingw32/lib/lib{i,I}phlpapi.a + # > ln -s /usr/x86_64-w64-mingw32/include/{i,I}phlpapi.h + # > ln -s /usr/i686-w64-mingw32/lib/lib{i,I}phlpapi.a + # > ln -s /usr/i686-w64-mingw32/include/{i,I}phlpapi.h + + export GODOT_ANDROID_KEYSTORE_RELEASE_PATH="$HOME/infra/misc/hurrycurry/hurrycurry.keystore" # this wont work on your machine :) + export GODOT_ANDROID_KEYSTORE_RELEASE_USER="hurrycurry" + export GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD="hurrycurry" + export CXXFLAGS= + export LDFLAGS= + export CFLAGS= + + mkdir -p out + cd "hurrycurry" + + make client + make -C data all + + local datafiles + datafiles=(data/recipes/*.yaml data/maps/*.yaml data/index.yaml data/book.json) + tar --zstd -cvf ../out/data.tar.zst "${datafiles[@]}" + zip ../out/data.zip "${datafiles[@]}" + + godot --headless --export-pack wasm32-unknown-unknown ../../out/client-any.pck client/project.godot + godot --headless --export-release wasm32-unknown-unknown ../../out/client-wasm32-unknown-unknown.html client/project.godot + for t in "${_targets[@]}"; do + godot --headless --export-release "$t" "../../out/client-$t$(_target_suf "$t")" client/project.godot + done + + for t in "${_targets[@]}"; do + if echo "$t" | grep -q android; then echo skip "$t"; continue; fi + echo build "$t" + cargo build --release --target "$t" --bin hurrycurry-server + cargo build --release --target "$t" --bin hurrycurry-discover + cargo build --release --target "$t" --bin hurrycurry-replaytool + done +} +package() { + out="$pkgdir/usr/share/hurrycurry/standalone-files/nightly" + install -Dvm644 "out/client-any.pck" "$out/client-any.pck" + install -Dvm644 "out/data.tar.zst" "$out/data.tar.zst" + install -Dvm644 "out/data.zip" "$out/data.zip" + for t in "${_targets[@]}"; do + local suf + suf=$(_target_suf "$t") + install -Dvm644 "out/client-$t$suf" "$out/client-$t$suf" + if echo "$t" | grep -q android; then continue; fi + install -Dvm644 "hurrycurry/target/$t/release/hurrycurry-server$suf" "$out/server-$t$suf" + install -Dvm644 "hurrycurry/target/$t/release/hurrycurry-discover$suf" "$out/discover-$t$suf" + install -Dvm644 "hurrycurry/target/$t/release/hurrycurry-replaytool$suf" "$out/replaytool-$t$suf" + done +} |