diff options
author | Eric Langlois | 2018-08-26 17:15:52 -0400 |
---|---|---|
committer | Eric Langlois | 2018-08-26 17:15:52 -0400 |
commit | 530fdfecba1a9cccaf1f5dd91729743339a6d1ff (patch) | |
tree | 75c94a45534a77b1671f955c67f416ef5a64bf06 | |
download | aur-530fdfecba1a9cccaf1f5dd91729743339a6d1ff.tar.gz |
Initial commit of spacechem-hib
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | spacechem-hib.desktop | 10 | ||||
-rw-r--r-- | spacechem-hib.patch | 8 |
5 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5e7e52e5ff59 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = spacechem-hib + pkgdesc = A design-based puzzle game from Zachtronics Industries. Humble Bundle version. + pkgver = 1345144627 + pkgrel = 1 + url = http://www.zachtronics.com/spacechem/ + arch = x86_64 + license = custom + depends = sdl + depends = sdl_image + depends = sdl_mixer + depends = mono + depends = xclip + optdepends = lib32-glibc: Recording runs via rgb2theora + provides = spacechem + conflicts = spacechem + conflicts = gog-spacechem + source = spacechem-linux-1345144627-amd64.deb::hib://spacechem-linux-1345144627-amd64.deb + source = spacechem-hib.desktop + source = spacechem-hib.patch + md5sums = c08fb05e1909c0b4ccae82a862da6e3a + md5sums = 9a436b55222c47c0c03060de4043d8a1 + md5sums = ba3ced2decc0fce6d6cf609f7cd44713 + +pkgname = spacechem-hib + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..784120704e9e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +spacechem-linux*.deb +*.pkg.tar.gz +*.pkg.tar.xz +*.pkg.tar +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8f05b67f15a9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Eric Langlois <eric@langlois.xyz> + +pkgname=spacechem-hib +_installname=spacechem +pkgver=1345144627 +pkgrel=1 +pkgdesc="A design-based puzzle game from Zachtronics Industries. Humble Bundle version." +license=('custom') +arch=('x86_64') +url="http://www.zachtronics.com/spacechem/" +depends=('sdl' 'sdl_image' 'sdl_mixer' 'mono' 'xclip') +optdepends=('lib32-glibc: Recording runs via rgb2theora') +provides=('spacechem') +conflicts=('spacechem' 'gog-spacechem') +PKGEXT=".pkg.tar" +_gamepkg="${_installname}-linux-${pkgver}-amd64.deb" + +# You can download the Humble Indie Bundle file manually, or you can configure +# DLAGENTS in makepkg.conf to auto-download. +# +# For example, to use hib-dlagent to download files set something like this in +# your makepkg.conf (change/add -k and add -u/-p to your needs): +# DLAGENTS=('hib::/usr/bin/hib-dlagent -k 1a2b3c -o %o $(echo %u | cut -c 7-)') +# +# To auto-search through a directory containing Humble Bundle downloads, you +# could set: +# DLAGENTS=('hib::/usr/bin/find /path/to/downloads -name $(echo %u | cut -c 7-) -exec ln -s \{\} %o \; -quit') +DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Download manually to \"$(pwd)\" or setup hib:// DLAGENT in /etc/makepkg.conf."; exit 1') + +source=("${_gamepkg}"::"hib://${_gamepkg}" + "${pkgname}.desktop" + "${pkgname}.patch") +md5sums=('c08fb05e1909c0b4ccae82a862da6e3a' + '9a436b55222c47c0c03060de4043d8a1' + 'ba3ced2decc0fce6d6cf609f7cd44713') + +_src_opt_dir="opt/zachtronicsindustries/${_installname}" +prepare() { + echo "extracting data.tar.gz" + tar -xzf data.tar.gz + patch -Np0 -i ${pkgname}.patch + + # Use our own desktop file so this one is unnecessary. + rm "${_src_opt_dir}/zachtronicsindustries-spacechem.desktop" + + # For reasons I don't fully understand, removing this stops the game from + # crashing. Hypothesis: + # The game expects Mono 2 but Arch uses 4, and Mono.Security.dll is built in + # to Mono 4. Using this old instance of the dll causes problems. + rm "${_src_opt_dir}/Mono.Security.dll" + + chmod a-x "${_src_opt_dir}/icon.png" +} + +package() { + install -dm755 "${pkgdir}/opt/${_installname}" + _abs_src_opt_dir="${srcdir}/${_src_opt_dir}" + + cp -r "${_abs_src_opt_dir}/"* "${pkgdir}/opt/${_installname}/" + + install -Dm644 "${_abs_src_opt_dir}/icon.png" "${pkgdir}/usr/share/pixmaps/${_installname}.png" + + install -dm755 "${pkgdir}/usr/share/licenses/${_installname}" + cp -r "${_abs_src_opt_dir}/readme/"* "${pkgdir}/usr/share/licenses/${_installname}" + + install -d "${pkgdir}/usr/bin" + ln -s "/opt/${_installname}/spacechem-launcher.sh" "${pkgdir}/usr/bin/${_installname}" + + install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${_installname}.desktop" +} diff --git a/spacechem-hib.desktop b/spacechem-hib.desktop new file mode 100644 index 000000000000..463c6286a6a9 --- /dev/null +++ b/spacechem-hib.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=SpaceChem +GenericName=Game +Comment=Solve design-based challenges in this game from Zachtronics Industries +Icon=spacechem +Exec=/opt/spacechem/spacechem-launcher.sh +Terminal=false +Categories=Game; diff --git a/spacechem-hib.patch b/spacechem-hib.patch new file mode 100644 index 000000000000..5a3fb46615b8 --- /dev/null +++ b/spacechem-hib.patch @@ -0,0 +1,8 @@ +--- opt/zachtronicsindustries/spacechem/spacechem-launcher.sh 2011-08-14 03:04:40.000000000 -0400 ++++ opt/zachtronicsindustries/spacechem/spacechem-launcher.sh.new 2018-08-26 14:48:48.092916021 -0400 +@@ -1,4 +1,4 @@ + #!/bin/sh +-cd /opt/zachtronicsindustries/spacechem/ ++cd /opt/spacechem/ + mono SpaceChem.exe + |