summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD64
-rw-r--r--theme-hospital-gog.desktop7
-rw-r--r--theme-hospital-gog.install14
-rw-r--r--theme-hospital-gog.sh29
5 files changed, 136 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a25ea2b77ad
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = theme-hospital-gog
+ pkgdesc = Manage a hospital in this humoristic business simulation game (gog.com version)
+ pkgver = 2.0.0.5
+ pkgrel = 1
+ url = http://gog.com
+ install = theme-hospital-gog.install
+ arch = any
+ license = custom: commercial
+ makedepends = innoextract
+ makedepends = icoutils
+ depends = bash
+ optdepends = corsix-th: to play it natively
+ optdepends = dosbox=0.74: to play with the original executable
+ source = gog://setup_theme_hospital_2.0.0.5.exe
+ source = theme-hospital-gog.desktop
+ source = theme-hospital-gog.sh
+ sha256sums = c41a77632ca1c33389b57d7210936eb5151ceb6d540707420a4de2d55bd47497
+ sha256sums = 22b24005cc952ae0a7ff92a63c9791567206ebde58740ebc66dfad65060a39b5
+ sha256sums = e47f1ce9b24d1154d0748bbbefdc2a9979f90ff051404f666897968ec7d5c5aa
+
+pkgname = theme-hospital-gog
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6ce5ad5b6c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgname=theme-hospital-gog
+pkgver=2.0.0.5
+pkgrel=1
+pkgdesc="Manage a hospital in this humoristic business simulation game (gog.com version)"
+url="http://gog.com"
+license=('custom: commercial')
+arch=('any')
+makedepends=('innoextract' 'icoutils')
+depends=('bash')
+optdepends=('corsix-th: to play it natively'
+ 'dosbox=0.74: to play with the original executable')
+install=$pkgname.install
+# You need to download the gog.com installer file manually or with lgogdownloader.
+# Or you can configure DLAGENTS in makepkg.conf to auto-search through a directory
+# containing gog.com downloads:
+# DLAGENTS=('gog::/usr/bin/find /path/to/downloads -name $(echo %u | cut -c 7-) -exec ln -s \{\} %o \; -quit')
+DLAGENTS+=('gog::/usr/bin/echo "Could not find \"$(echo %u | cut -c 7-)\". Manually download it to \"$(pwd)\", or set up a gog:// DLAGENT."; exit 1')
+source=("gog://setup_theme_hospital_$pkgver.exe"
+ "$pkgname.desktop"
+ "$pkgname.sh")
+sha256sums=('c41a77632ca1c33389b57d7210936eb5151ceb6d540707420a4de2d55bd47497'
+ '22b24005cc952ae0a7ff92a63c9791567206ebde58740ebc66dfad65060a39b5'
+ 'e47f1ce9b24d1154d0748bbbefdc2a9979f90ff051404f666897968ec7d5c5aa')
+PKGEXT=".pkg.tar"
+
+prepare() {
+ # extract installer (convert files to lowercase, as DOS does not care)
+ innoextract -e -L -d "$srcdir" setup_theme_hospital_${pkgver}.exe
+ # convert icon
+ icotool -x app/gfw_high.ico
+ # create launchers
+ for _m in client server settings; do
+ sed "s|Exec=theme-hospital|&-$_m|;s|Name=Theme Hospital|& (${_m^})|" \
+ $pkgname.desktop > theme-hospital-$_m.desktop
+ done
+ # remove bundled dosbox and windows stuff
+ rm -rf app/dosbox app/*.ico app/*.dll
+ # fix mount directory
+ sed 's|mount C ..|mount C .|' -i app/dosbox*.conf
+}
+
+package() {
+ # data
+ install -d "$pkgdir"/opt/theme-hospital
+ cp -r app/* "$pkgdir"/opt/theme-hospital
+ # fix permissions
+ chgrp -R games "$pkgdir"/opt/theme-hospital/{save,hospital.cfg}
+ chmod -R g+w "$pkgdir"/opt/theme-hospital/{save,hospital.cfg}
+ # doc + licenses
+ install -d "$pkgdir"/usr/share/{doc,licenses}/$pkgname
+ ln -s -t "$pkgdir"/usr/share/doc/$pkgname /opt/theme-hospital/{manual.pdf,readme.txt,netplay.txt}
+ install -m644 tmp/{gog_,}eula.txt "$pkgdir"/usr/share/licenses/$pkgname
+ # .desktop files and launchers
+ install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/theme-hospital.desktop
+ install -Dm755 $pkgname.sh "$pkgdir"/usr/bin/theme-hospital
+ for _m in client server settings; do
+ ln -s theme-hospital "$pkgdir"/usr/bin/theme-hospital-$_m
+ install -m644 theme-hospital-$_m.desktop "$pkgdir"/usr/share/applications
+ done
+ # icon
+ install -Dm644 gfw_high_7_48x48x32.png "$pkgdir"/usr/share/pixmaps/theme-hospital.png
+}
diff --git a/theme-hospital-gog.desktop b/theme-hospital-gog.desktop
new file mode 100644
index 00000000000..bfcd4dd5f89
--- /dev/null
+++ b/theme-hospital-gog.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Theme Hospital
+Exec=theme-hospital
+Icon=theme-hospital
+Categories=Game;
+Terminal=false
diff --git a/theme-hospital-gog.install b/theme-hospital-gog.install
new file mode 100644
index 00000000000..0c8f0d1dde5
--- /dev/null
+++ b/theme-hospital-gog.install
@@ -0,0 +1,14 @@
+
+post_install() {
+ echo "If you want to play the original executable, you need to install dosbox. Also"
+ echo "your user needs to be in the games group to be allowed to save."
+ echo "You can choose the language of the game in '/opt/theme-hospital/hospital.cfg',"
+ echo "for example GER for german."
+ echo "Alternatively, you can install and use the reimplementation corsix-th(-git),"
+ echo "it has various improvements. When you start corsix-th the first time, you need"
+ echo "to choose the game folder '/opt/theme-hospital'."
+}
+
+post_upgrade() {
+ post_install
+} \ No newline at end of file
diff --git a/theme-hospital-gog.sh b/theme-hospital-gog.sh
new file mode 100644
index 00000000000..7234b4fc886
--- /dev/null
+++ b/theme-hospital-gog.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# simple launcher by carstene1ns 2014
+#
+
+# get script name
+script=${0##*/}
+
+# get game mode
+mode=${script#theme-hospital-}
+
+case "$mode" in
+ client)
+ EXTRACONF=dosboxth_client.conf
+ ;;
+ server)
+ EXTRACONF=dosboxth_server.conf
+ ;;
+ settings)
+ EXTRACONF=dosboxth_settings.conf
+ ;;
+ *)
+ EXTRACONF=dosboxth_single.conf
+esac
+
+# launch
+cd /opt/theme-hospital && exec dosbox -conf dosboxth.conf -conf $EXTRACONF
+
+# eof