summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudia Pellegrino2022-03-08 23:48:56 +0100
committerClaudia Pellegrino2022-03-08 23:48:56 +0100
commita167e3173c5b43d38ffbe7e408a9a4e540a673d5 (patch)
tree42ef1a175795a0ac94769000e5564261408bb6a7
downloadaur-a167e3173c5b43d38ffbe7e408a9a4e540a673d5.tar.gz
gog-inscryption 1.08.51256
-rw-r--r--.SRCINFO26
-rw-r--r--.editorconfig23
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD71
-rw-r--r--gog-inscryption.desktop11
-rw-r--r--gog-inscryption.install36
-rw-r--r--inscryption.bash58
7 files changed, 231 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..78a78330faa2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = gog-inscryption
+ pkgdesc = Roguelike deck-building game. GOG version, uses Wine.
+ pkgver = 1.08.51256
+ pkgrel = 1
+ url = https://www.inscryption.com/
+ install = gog-inscryption.install
+ arch = x86_64
+ license = custom
+ makedepends = innoextract
+ makedepends = lgogdownloader
+ depends = wine
+ depends = wine-mono
+ optdepends = lib32-alsa-lib: sound support for ALSA
+ optdepends = lib32-libpulse: sound support for PulseAudio
+ conflicts = gog-inscryption-demo
+ options = !strip
+ source = setup_inscryption_1.08_(51256).exe::gogdownloader://1224800338/en1installer0
+ source = setup_inscryption_1.08_(51256)-1.bin::gogdownloader://1224800338/en1installer1
+ source = gog-inscryption.desktop
+ source = inscryption.bash
+ sha512sums = 0e294700cbbe3888ddecc5f1162803434b5c75b7bb4c82c6e23a77753fea35f0a16fe27a0851ed58708522923f4f9563390448703f4fa36d42079e620c5a69cc
+ sha512sums = 75ac79d2d4802dd82627bd921964bcc4957cfa0eaa7e81f2c495ebf4bc27a81372b5779149ab9f024b8634617ec1a2a015fceaf795a1db85f73ae4f579f6a2e2
+ sha512sums = 65226f2e071bc7dad63d683d6ad5f255dff354ca6c5478fa2e606933383af48d2ee2b2fa1450936227a59e1831f2ff44293d00a835daa98aa215b6e50755a7bf
+ sha512sums = 0a8db49802625c2207a2efae3b498f53547c79f0b003e6ca020c7aa2e0870e4a6393688d4b1e244f23088cbeab830112bf925c0f464fc58e97c5b5d0582e2232
+
+pkgname = gog-inscryption
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..1a0834469d77
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,23 @@
+# https://editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[.gitattributes]
+indent_size = 16
+
+[*.{diff,patch}]
+end_of_line = lf
+trim_trailing_whitespace = false
+
+[PKGBUILD]
+indent_size = 2
+
+[*.install]
+indent_size = 2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..18cc61931927
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/.vscode
+/src
+/pkg
+/setup_*
+*.pkg.*
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2011fed1be5c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>
+
+pkgname="gog-inscryption"
+pkgver=1.08.51256
+pkgrel=1
+pkgdesc='Roguelike deck-building game. GOG version, uses Wine.'
+arch=('x86_64')
+url='https://www.inscryption.com/'
+license=('custom')
+depends=('wine' 'wine-mono')
+makedepends=('innoextract' 'lgogdownloader')
+optdepends=(
+ 'lib32-alsa-lib: sound support for ALSA'
+ 'lib32-libpulse: sound support for PulseAudio'
+)
+conflicts=('gog-inscryption-demo')
+options=('!strip')
+install="${pkgname}.install"
+_shortname="${pkgname#gog-}"
+_setup_basename="setup_${_shortname}_${pkgver%.*}_(${pkgver##*.})"
+
+# Need to hard-code the ID because lgogdownloader would force a
+# prompt whenever we attempt to download `inscryption` while our
+# GOG account also owns `inscryption_demo`
+_gog_id='1224800338'
+
+source=(
+ "${_setup_basename}.exe`
+ `::gogdownloader://${_gog_id}/en1installer0"
+ "${_setup_basename}-1.bin`
+ `::gogdownloader://${_gog_id}/en1installer1"
+ "${pkgname}.desktop"
+ "${_shortname}.bash"
+)
+
+sha512sums=(
+ '0e294700cbbe3888ddecc5f1162803434b5c75b7bb4c82c6e23a77753fea35f0a16fe27a0851ed58708522923f4f9563390448703f4fa36d42079e620c5a69cc'
+ '75ac79d2d4802dd82627bd921964bcc4957cfa0eaa7e81f2c495ebf4bc27a81372b5779149ab9f024b8634617ec1a2a015fceaf795a1db85f73ae4f579f6a2e2'
+ '65226f2e071bc7dad63d683d6ad5f255dff354ca6c5478fa2e606933383af48d2ee2b2fa1450936227a59e1831f2ff44293d00a835daa98aa215b6e50755a7bf'
+ '0a8db49802625c2207a2efae3b498f53547c79f0b003e6ca020c7aa2e0870e4a6393688d4b1e244f23088cbeab830112bf925c0f464fc58e97c5b5d0582e2232'
+)
+
+DLAGENTS+=('gogdownloader::/usr/bin/lgogdownloader --download-file=%u -o %o')
+PKGEXT=.pkg.tar
+
+prepare() {
+ mkdir -p "${srcdir}/${_shortname}"
+ cd "${srcdir}/${_shortname}"
+ innoextract -c -m --progress=1 "${srcdir}/${_setup_basename}.exe"
+}
+
+package() {
+ echo >&2 'Packaging game icon'
+ install -D -m 644 -T \
+ "${srcdir}/${_shortname}/app/goggame-"${_gog_id?}".ico" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.ico"
+
+ echo >&2 'Packaging game data'
+ mkdir -p "${pkgdir}/opt/"
+ mv "${srcdir}/${_shortname}" "${pkgdir}/opt/${_shortname}"
+
+ echo >&2 'Packaging launcher'
+ install -D -m 755 -T \
+ "${srcdir}/${_shortname}.bash" \
+ "${pkgdir}/usr/bin/${_shortname}"
+
+ echo >&2 'Packaging desktop file'
+ install -D -m 755 -T \
+ "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+}
diff --git a/gog-inscryption.desktop b/gog-inscryption.desktop
new file mode 100644
index 000000000000..27c9ded77bb0
--- /dev/null
+++ b/gog-inscryption.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Inscryption
+Comment=Roguelike demonic deck-building game
+Exec=inscryption
+Icon=gog-inscryption
+Type=Application
+Terminal=false
+StartupNotify=true
+StartupWMClass=Inscryption.exe
+Categories=Game;
+Encoding=UTF-8
diff --git a/gog-inscryption.install b/gog-inscryption.install
new file mode 100644
index 000000000000..5995073fc5da
--- /dev/null
+++ b/gog-inscryption.install
@@ -0,0 +1,36 @@
+post_install() {
+ cat >&2 << 'EOF'
+
+ ## ##
+ ## Wine will be used to run this Windows game; ##
+ ## therefore, not everything may work properly. ##
+ ## ##
+ ## Please see: ##
+
+> https://wiki.archlinux.org/title/Wine#Sound
+
+ ## ##
+ ## to figure out which optional dependencies you ##
+ ## need to enable sound. ##
+ ## Also see: ##
+
+> https://appdb.winehq.org/objectManager.php?sClass=application&iId=20583
+
+ ## for details and known limitations. ##
+ ## ##
+
+EOF
+}
+
+post_remove() {
+ cat >&2 << 'EOF'
+
+ ## ##
+ ## To completely remove user game data, delete ##
+ ## the following directory: ##
+ ## ##
+ ## ~/.local/share/inscryption ##
+ ## ##
+
+EOF
+}
diff --git a/inscryption.bash b/inscryption.bash
new file mode 100644
index 000000000000..babb6dcbff4d
--- /dev/null
+++ b/inscryption.bash
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+set -eu
+
+PKGNAME='inscryption'
+APPNAME_UPSTREAM='Inscryption'
+EXE="C:/Program Files/GOG Games/${APPNAME_UPSTREAM}/Inscryption.exe"
+PKG_USER_DATA_HOME="${XDG_DATA_HOME:-"${HOME}/.local/share"}/${PKGNAME}"
+
+echo >&2 "Initializing"
+
+export WINEARCH='win64'
+export WINEPREFIX="${PKG_USER_DATA_HOME}/wine"
+
+APPDIR_SOURCE="/opt/${PKGNAME}"
+APPDIR_PARENT="${WINEPREFIX}/drive_c/Program Files/GOG Games"
+APPDIR_TARGET="${APPDIR_PARENT}/${APPNAME_UPSTREAM}"
+TARGET_HOME="${WINEPREFIX}/drive_c/users/$(whoami)"
+
+USER_APPDATADIR_SOURCE="${PKG_USER_DATA_HOME}/userappdata"
+USER_APPDATADIR_TARGET="${TARGET_HOME}/AppData/LocalLow/Daniel Mullins Games"
+USER_OVERLAYDIR="${PKG_USER_DATA_HOME}/overlay"
+
+echo >&2 "Checking for Wine prefix"
+if ! [ -d "${WINEPREFIX}" ]; then
+ echo >&2 "==> Bootstrapping Wine prefix: ${WINEPREFIX}"
+ mkdir >&2 -pv "${WINEPREFIX}"
+ wineboot -i 2>&1
+ rm >&2 -fv "${WINEPREFIX}/dosdevices/z:"
+ echo >&2 "==> Done"
+fi
+
+echo >&2 "Checking user data directory"
+if ! [ -h "${USER_APPDATADIR_TARGET}/${APPNAME_UPSTREAM}" ]; then
+ echo >&2 "==> Creating ${USER_APPDATADIR_TARGET}"
+ mkdir >&2 -pv "${USER_APPDATADIR_TARGET}"
+ cd "${USER_APPDATADIR_TARGET}"
+ echo >&2 "==> Linking from ${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}"
+ mkdir >&2 -pv "${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}"
+ ln >&2 -fnsv "${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}"
+fi
+
+echo >&2 "Checking app directory"
+if ! [ -h "${APPDIR_TARGET}" ]; then
+ echo >&2 "==> Creating ${APPDIR_PARENT}"
+ mkdir >&2 -pv "${APPDIR_PARENT}"
+ echo >&2 "==> Creating ${USER_OVERLAYDIR}"
+ mkdir >&2 -pv "${USER_OVERLAYDIR}"
+ echo >&2 "==> Linking from ${USER_OVERLAYDIR}"
+ ln >&2 -fnsv "${USER_OVERLAYDIR}" "${APPDIR_TARGET}"
+ cd "${APPDIR_TARGET}/"
+ echo >&2 "==> Linking from ${APPDIR_SOURCE}"
+ find "${APPDIR_SOURCE}" -mindepth 1 -maxdepth 1 -exec ln >&2 -fnsv '{}' ';'
+ echo >&2 "==> Done"
+fi
+
+echo >&2 "Launching app with Wine"
+wine 2>&1 "${EXE}"
+echo >&2 "==> Finished"