summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoroysstu2018-08-16 08:15:27 +0200
committeroysstu2018-08-16 08:15:27 +0200
commit848a44bcc40e6d06dfb52149a40800851291726e (patch)
treeca4e2abb407109af3fbba107714df6e445b1fd38
downloadaur-848a44bcc40e6d06dfb52149a40800851291726e.tar.gz
Initial version
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD64
-rwxr-xr-xvampire-the-masquerade-bloodlines.bash45
-rw-r--r--vampire-the-masquerade-bloodlines.desktop9
4 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0f8f938299f8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = gog-vampire-the-masquerade-bloodlines
+ pkgdesc = Vampire®: The Masquerade - Bloodlines™. GOG version (Wine).
+ pkgver = 1.2_up10_22135
+ pkgrel = 1
+ url = https://www.gog.com/game/jazz_jackrabbit_2_collection
+ arch = x86_64
+ license = custom
+ makedepends = innoextract
+ makedepends = unzip
+ depends = wine
+ source = file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135).exe
+ source = file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135)-1.bin
+ source = file://vampire-the-masquerade-bloodlines.bash
+ source = file://vampire-the-masquerade-bloodlines.desktop
+ sha256sums = 660687df598d03866011e103680030e8c29aa165d9088fa05aae7c90f28bdf5b
+ sha256sums = b69f90787295c8780973ea3bf599b1089ac09b4bcd97a622fc89bbffeb65685d
+ sha256sums = 83dc8c11b71e060824061fca50523542af9735a115318689f3fb9cae22bf05cc
+ sha256sums = af3096274bd636907b9a588d5ecadc102c72a36da4040958833183da54100d43
+
+pkgname = gog-vampire-the-masquerade-bloodlines
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c67b6401681f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Oystein Sture <oysstu ät gmail dõt cóm>
+# Contributor:
+
+pkgname=gog-vampire-the-masquerade-bloodlines
+_gogver=1.2_up10
+_gogrel=22135
+_gamename=${pkgname#gog-}
+_gamename=${_gamename//-/_}
+
+pkgver=${_gogver}_${_gogrel}
+pkgrel=1
+pkgdesc='Vampire®: The Masquerade - Bloodlines™. GOG version (Wine).'
+arch=('x86_64')
+url='https://www.gog.com/game/jazz_jackrabbit_2_collection'
+license=('custom')
+
+depends=('wine')
+makedepends=('innoextract' 'unzip')
+
+source=(
+ "file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel}).exe"
+ "file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel})-1.bin"
+ "file://vampire-the-masquerade-bloodlines.bash"
+ "file://vampire-the-masquerade-bloodlines.desktop"
+)
+
+sha256sums=(
+ "660687df598d03866011e103680030e8c29aa165d9088fa05aae7c90f28bdf5b"
+ "b69f90787295c8780973ea3bf599b1089ac09b4bcd97a622fc89bbffeb65685d"
+ "83dc8c11b71e060824061fca50523542af9735a115318689f3fb9cae22bf05cc"
+ "af3096274bd636907b9a588d5ecadc102c72a36da4040958833183da54100d43"
+)
+
+# Prevent compressing final package
+PKGEXT='.pkg.tar'
+
+prepare() {
+ cd "${srcdir}"
+ innoextract -c -m -s --progress=1 "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel}).exe"
+ unzip "app/webcache.zip" "333aae3c07b0beee2653175bd76cfc74e719b184d04bb15477196c558c6c07cb.png"
+
+ # Remove unneeded files
+ rm -rf "__redist"
+ rm "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135).exe"
+ rm "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135)-1.bin"
+}
+
+package() {
+ msg2 'Packaging game icon'
+ install -Dm644 -T "${srcdir}/333aae3c07b0beee2653175bd76cfc74e719b184d04bb15477196c558c6c07cb.png" "${pkgdir}/usr/share/pixmaps/${pkgname#gog-}.png"
+
+ msg2 'Packaging license'
+ install -Dm644 "${srcdir}/Docs/License.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ msg2 'Packaging launcher'
+ install -Dm755 -T "${srcdir}/${pkgname#gog-}.bash" "${pkgdir}/usr/bin/${pkgname#gog-}"
+
+ msg2 'Packaging desktop shortcut'
+ install -Dm644 "${srcdir}/${pkgname#gog-}.desktop" "${pkgdir}/usr/share/applications/${pkgname#gog-}.desktop"
+
+ msg2 'Packaging game data'
+ mkdir -p "${pkgdir}/opt/${pkgname}"
+ mv -T "${srcdir}/" "${pkgdir}/opt/${pkgname}"
+}
diff --git a/vampire-the-masquerade-bloodlines.bash b/vampire-the-masquerade-bloodlines.bash
new file mode 100755
index 000000000000..20ca243f3092
--- /dev/null
+++ b/vampire-the-masquerade-bloodlines.bash
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+set -eu
+
+PKGNAME='gog-vampire-the-masquerade-bloodlines'
+APPNAME='Vampire the Masquerade - Bloodlines'
+EXE="C:/GOG Games/${APPNAME}/vampire.exe"
+
+##
+## Setup wine and launch game
+##
+export WINEARCH='win32'
+export WINEPREFIX=$HOME/.local/share/$PKGNAME/wine
+export WINEDLLOVERRIDES="mscoree,mshtml=;dbghelp=n,b" # Skip mono, gecko, and add mod loader dll hook
+APPDIR_INSTALL=/opt/$PKGNAME
+APPDIR_PARENT="${WINEPREFIX}/drive_c/GOG Games"
+APPDIR_USER=$HOME/.local/share/$PKGNAME/user
+
+# Symlink install dir to user dir
+if ! [ -d $APPDIR_USER ]; then
+ mkdir -p $APPDIR_USER
+ cp -as -T $APPDIR_INSTALL $APPDIR_USER
+fi
+
+echo >&2 "Setting up wine prefix"
+if ! [ -d "${WINEPREFIX}" ]; then
+ (
+ mkdir -pv "${WINEPREFIX}"
+ wineboot -i
+ rm -fv "${WINEPREFIX}/dosdevices/z:"
+ )
+fi
+
+echo >&2 "Setting up wine game directory"
+if ! [ -d "${APPDIR_PARENT}/${APPNAME}" ]; then
+ (
+ mkdir -pv "${APPDIR_PARENT}"
+ ln -fnsv "${APPDIR_USER}" "${APPDIR_PARENT}/${APPNAME}"
+ )
+fi
+
+echo >&2 "Launching ${APPNAME} via wine"
+cd "${APPDIR_PARENT}/${APPNAME}"
+wine vampire.exe -game Unofficial_Patch && xrandr -s 0
+
+echo >&2 "Finished"
diff --git a/vampire-the-masquerade-bloodlines.desktop b/vampire-the-masquerade-bloodlines.desktop
new file mode 100644
index 000000000000..68b145e19934
--- /dev/null
+++ b/vampire-the-masquerade-bloodlines.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Vampire: The Masquerade - Bloodlines
+Version=1.2
+Comment=Vampire®: The Masquerade - Bloodlines™ (GOG.com, Wine)
+Exec=/usr/bin/vampire-the-masquerade-bloodlines
+Icon=/usr/share/pixmaps/vampire-the-masquerade-bloodlines.png
+Type=Application
+StartupNotify=false
+Categories=Game;