🗝
about summary refs log tree commit diff
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-05-26 22:06:07 -0700
committermia <mia@mia.jetzt>2024-05-26 22:06:07 -0700
commitab1833bd5a864aafdca43ff01c6c7ceb2015a231 (patch)
tree8656a78d1430c859f7956a9bd9133f5cc8b1a5df
downloadarch-temmie-ab1833bd5a864aafdca43ff01c6c7ceb2015a231.tar.gz
arch-temmie-ab1833bd5a864aafdca43ff01c6c7ceb2015a231.zip
initial commit HEAD main
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD70
-rw-r--r--README.md8
-rw-r--r--dwellers-empty-path.desktop8
-rw-r--r--escaped-chasm.desktop8
5 files changed, 98 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3a10cc6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.pkg.*
+/*.tar.*
+/pkg
+/src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..279d01b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: mia <mia@mia.jetzt>
+# shellcheck shell=bash disable=SC2034 disable=SC2100 disable=SC2154
+pkgbase=arch-temmie
+pkgname=(escaped-chasm dwellers-empty-path)
+pkgver=1
+pkgrel=1
+arch=(x86_64)
+source=(https://dl.nwjs.io/v0.12.0/nwjs-v0.12.0-linux-x64.tar.gz escaped-chasm.desktop dwellers-empty-path.desktop)
+sha256sums=(d0a1b0e8e9e4f647a5139aa08175c03e797411deb4d206bc7ab228629b5021d4 SKIP SKIP)
+depends=(alsa-lib gconf gtk2 nss ttf-font)
+
+prepare() {
+    token=$(curl https://itch.io -s -o /dev/null -D - | grep '^Set-Cookie:' | cut -d ':' -f 2 | cut -d ';' -f 2 | cut -d '=' -f 2)
+
+    echo "Downloading Escaped Chasm"
+    url=$(curl https://tuyoki.itch.io/escaped-chasm/file/1353127 -s -X POST -d "csrf_token=$token" | jq -r .url)
+    curl "$url" -o "$srcdir/game.zip"
+    unzip "$srcdir/game.zip" -d "$srcdir"
+    test -d "$srcdir/escaped-chasm" && rm -r "$srcdir/escaped-chasm"
+    mv "$srcdir/Same Game but with RPGMaker icon/Escaped_Chasm_Contents/Escaped_Chasm" "$srcdir/escaped-chasm"
+    mv "$srcdir/Same Game but with RPGMaker icon/Escaped_Chasm_Contents/Extras" "$srcdir/escaped-chasm-extras"
+    rm "$srcdir/game.zip"
+    rm -r "$srcdir/Same Game but with RPGMaker icon"
+    mv "$srcdir/escaped-chasm-extras/Escaped_Chasm_2" "$srcdir/escaped-chasm-2"
+
+    echo "Downloading Dweller's Empty Path"
+    url=$(curl https://tuyoki.itch.io/dwellers-empty-path/file/2874800 -s -X POST -d "csrf_token=$token" | jq -r .url)
+    curl "$url" -o "$srcdir/game.zip"
+    unzip "$srcdir/game.zip" -d "$srcdir"
+    test -d "$srcdir/dwellers-empty-path" && rm -r "$srcdir/dwellers-empty-path"
+    mv "$srcdir/RPGMAKER ICON VER/Dweller's Empty Path" "$srcdir/dwellers-empty-path"
+    rm "$srcdir/game.zip"
+    rmdir "$srcdir/RPGMAKER ICON VER"
+
+    test -d "$srcdir/nwjs" && rm -r "$srcdir/nwjs"
+    mv "$srcdir/nwjs-v0.12.0-linux-x64" "$srcdir/nwjs"
+}
+
+package_escaped-chasm() {
+    pkgdesc='A small little RPGmaker game about a lonely girl with a connection to another world that she sees in her dreams.'
+
+    install -Dm644 "$srcdir/escaped-chasm.desktop" "$pkgdir/usr/share/applications/escaped-chasm.desktop"
+    install -Dm644 "$srcdir/escaped-chasm/www/icon/icon.png" "$pkgdir/usr/share/pixmaps/escaped-chasm.png"
+
+    install -d "$pkgdir/opt/escaped-chasm"
+    cp -r "$srcdir/nwjs"/* "$pkgdir/opt/escaped-chasm/"
+    mv "$srcdir/escaped-chasm"/{www,package.json} "$pkgdir/opt/escaped-chasm/"
+    mv "$srcdir/escaped-chasm-extras" "$pkgdir/opt/escaped-chasm/extras"
+    mv "$srcdir/escaped-chasm/0_README.txt" "$pkgdir/opt/escaped-chasm/extras/"
+    mkdir -p "$pkgdir/usr/bin"
+    ln -s /opt/escaped-chasm/nw "$pkgdir/usr/bin/escaped-chasm"
+    install -dm777 "$pkgdir/opt/escaped-chasm/www/save"
+}
+
+package_dwellers-empty-path() {
+    pkgdesc='A small RPGMaker game exploring the life of a lost being from another world.'
+
+    install -Dm644 "$srcdir/dwellers-empty-path.desktop" "$pkgdir/usr/share/applications/dwellers-empty-path.desktop"
+    install -Dm644 "$srcdir/dwellers-empty-path/www/icon/icon.png" "$pkgdir/usr/share/pixmaps/dwellers-empty-path.png"
+
+    install -d "$pkgdir/opt/dwellers-empty-path"
+    cp -r "$srcdir/nwjs"/* "$pkgdir/opt/dwellers-empty-path/"
+    mv "$srcdir/dwellers-empty-path"/{www,package.json} "$pkgdir/opt/dwellers-empty-path/"
+    mv "$srcdir/dwellers-empty-path/Credits.txt" "$pkgdir/opt/dwellers-empty-path/"
+    mv "$srcdir/dwellers-empty-path/Extras" "$pkgdir/opt/dwellers-empty-path/"
+    mv "$srcdir/dwellers-empty-path/General Note and FAQ.txt" "$pkgdir/opt/dwellers-empty-path/Extras/"
+    mkdir -p "$pkgdir/usr/bin"
+    ln -s /opt/dwellers-empty-path/nw "$pkgdir/usr/bin/dwellers-empty-path"
+    install -dm777 "$pkgdir/opt/dwellers-empty-path/www/save"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..165638e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+Script to package Escaped Chasm and Dweller's Empty Path for Arch Linux, with
+the right ancient version of NW.js.
+
+Just run `makepkg -i` and watch it go!
+
+One problem with this script is that it sets the save directory to be
+world-readable. A proper solution might be a patch that changes where the save
+file is stored, although that may prove fragile with updates.
diff --git a/dwellers-empty-path.desktop b/dwellers-empty-path.desktop
new file mode 100644
index 0000000..edf81cd
--- /dev/null
+++ b/dwellers-empty-path.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Dweller's Empty Path
+Comment=A small RPGMaker game exploring the life of a lost being from another world.
+Exec=/opt/dwellers-empty-path/nw
+Icon=dwellers-empty-path
+Categories=Game;
diff --git a/escaped-chasm.desktop b/escaped-chasm.desktop
new file mode 100644
index 0000000..400b470
--- /dev/null
+++ b/escaped-chasm.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Escaped Chasm
+Comment=A small little RPGmaker game about a lonely girl with a connection to another world that she sees in her dreams.
+Exec=/opt/escaped-chasm/nw
+Icon=escaped-chasm
+Categories=Game;