summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-03-15 01:09:43 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-03-15 01:09:43 +0100
commitd2a0b2277d8e1e212380206712341a65b94b5e7e (patch)
tree3195939d8704463af102807b55a754df8ac34fb1
parent5b05d66cc2d9981fe5a231399a0b99eabc3bc8f4 (diff)
downloadwasted-appimage-oci-master.tar.gz
Add gen-builder.shHEADmaster
-rw-r--r--gen-builder.sh123
1 files changed, 123 insertions, 0 deletions
diff --git a/gen-builder.sh b/gen-builder.sh
new file mode 100644
index 0000000..1d84350
--- /dev/null
+++ b/gen-builder.sh
@@ -0,0 +1,123 @@
+#! /bin/sh
+
+while getopts a:d:p:u: arg
+do
+ case $arg in
+ a) arch="$OPTARG" ;;
+ d) dir="$OPTARG" ;;
+ p) dpkgarch="$OPTARG" ;;
+ u) url="$OPTARG" ;;
+ ?) printf "%s [-d <dir>] [-a <arch>] [-p <dpkgarch>] [-u <url>]\n" "$0"
+ esac
+done
+
+dir=${dir:-"/AppDir"}
+arch=${arch:-"$(uname -m)"}
+dpkgarch=${dpkgarch:-"$(dpkg --print-architecture)"}
+
+case $dpkgarch in
+ amd64|i386)
+ url="http://archive.ubuntu.com/ubuntu" ;;
+ arm64|armhf|ppc64el|riscv64|s390x)
+ url="http://ports.ubuntu.com/ubuntu-ports" ;;
+ *)
+ printf "Unknown Ubuntu repository URL for architecture %s\n" \
+ "$dpkgarch" >&2
+ exit 1
+esac
+
+cat <<EOF
+version: 1
+AppDir:
+ path: $dir
+ app_info:
+ id: org.wastedgames.Wasted
+ name: wasted
+ icon: icon
+ version: $(git describe --tags --dirty)
+ exec: usr/bin/wasted
+ exec_args: \$@
+ after_runtime: |
+ cd "\$TARGET_APPDIR/lib/$arch-linux-gnu/"
+ while read f
+ do
+ ln -rs ../../runtime/compat/lib/$arch-linux-gnu/\$f \$f
+ done <<EOF
+ libcrypt.so.1
+ libcrypt.so.1.1.0
+ libdl-2.31.so
+ libdl.so.2
+ libnsl-2.31.so
+ libnsl.so.1
+ libresolv-2.31.so
+ libresolv.so.2
+ libz.so.1
+ libz.so.1.2.11
+ EOF
+ apt:
+ arch:
+ - $dpkgarch
+ allow_unauthenticated: true
+ sources:
+ - sourceline: deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"]
+ $url focal main universe
+ - sourceline: deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"]
+ $url focal-updates main universe
+ - sourceline: deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"]
+ $url focal-security main universe
+ include:
+ - libc6:$dpkgarch
+ - locales
+ - libbluetooth3
+ - libcrypt1
+ - libenet7
+ - libexpat1
+ - libxext6
+ - libfreetype6
+ - libglu1-mesa
+ - libglx0
+ - libgl1
+ - libglvnd0
+ - libharfbuzz0b
+ - libmbedtls12
+ - libminizip1
+ - libogg0
+ - libopengl0
+ - libopenscenegraph160
+ - libcurl4
+ - libsdl2-2.0-0
+ - libsdl2-mixer-2.0-0
+ - libsdl2-ttf-2.0-0
+ - librhash0
+ - libpng16-16
+ - libjpeg8
+ - libvorbis0a
+ - libx11-6
+ - libwayland-egl1
+ - libwayland-client0
+ - libwayland-cursor0
+ - libxau6
+ - libxdmcp6
+ - libxcb1
+ - zlib1g
+ - libminizip1
+ - libopenal1
+ - libplib1
+ - bash
+ - dash
+ - perl
+ files:
+ include:
+ - lib64/ld-linux-$(echo $arch | tr _ -).so.2
+ - usr/share/games/wasted/*
+ - usr/lib/wasted/*
+ exclude:
+ - usr/share/man
+ - usr/share/doc/*/README.*
+ - usr/share/doc/*/changelog.*
+ - usr/share/doc/*/NEWS.*
+ - usr/share/doc/*/TODO.*
+AppImage:
+ arch: $arch
+ update-information: guess
+EOF