summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Zhu2016-08-12 10:48:41 -0500
committerJames Zhu2016-08-12 10:48:41 -0500
commit4d782889eba9e174e06cb163e28a74f54d637edc (patch)
treeec6e1da1c3bf311a0869a83e2f70f4dbe6cd7af9
downloadaur-4d782889eba9e174e06cb163e28a74f54d637edc.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD61
-rw-r--r--gog-spacechem.desktop10
-rw-r--r--gog-spacechem.patch7
4 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5abf649670b7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = gog-spacechem
+ pkgdesc = A puzzle game where you build elaborate chemical factories.
+ pkgver = 2.0.0.5
+ pkgrel = 1
+ url = http://www.zachtronics.com/spacechem/
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = lib32-glibc
+ depends = lib32-alsa-lib
+ depends = lib32-sdl_mixer
+ depends = lib32-ncurses5-compat-libs
+ depends = lib32-libjpeg-turbo
+ depends = lib32-libpng12
+ depends = lib32-glu
+ depends = lib32-libtiff
+ depends = lib32-fluidsynth
+ source = gog://gog_spacechem_2.0.0.5.sh
+ source = gog-spacechem.desktop
+ source = gog-spacechem.patch
+ sha256sums = c009d9bdd2c343700ac7e6681f640d3c5a6f362c7b5931753b26cd5f7ec635c3
+ sha256sums = 13163c5848f639d672c5802b28df8d192cd8639119b65b9db31982915757824c
+ sha256sums = 5fd3aba4d99000f15b125f868aa27b7e7d16f6b448b3cc92ab05c4d41ddf1037
+
+pkgname = gog-spacechem
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b12bc4576a07
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: James Zhu <james.zhu.engineer@gmail.com>
+
+pkgname=gog-spacechem
+_pkgname=spacechem
+pkgver=2.0.0.5
+pkgrel=1
+pkgdesc="A puzzle game where you build elaborate chemical factories."
+url="http://www.zachtronics.com/spacechem/"
+license=('custom')
+arch=('i686' 'x86_64')
+depends=('lib32-glibc' 'lib32-alsa-lib' 'lib32-sdl_mixer'
+ 'lib32-ncurses5-compat-libs' 'lib32-libjpeg-turbo' 'lib32-libpng12'
+ 'lib32-glu' 'lib32-libtiff' 'lib32-fluidsynth')
+source=("gog://${pkgname//-/_}_${pkgver}.sh"
+ "${pkgname}.desktop"
+ "${pkgname}.patch")
+sha256sums=('c009d9bdd2c343700ac7e6681f640d3c5a6f362c7b5931753b26cd5f7ec635c3'
+ '13163c5848f639d672c5802b28df8d192cd8639119b65b9db31982915757824c'
+ '5fd3aba4d99000f15b125f868aa27b7e7d16f6b448b3cc92ab05c4d41ddf1037')
+
+# You need to download the gog.com installer file manually or with lgogdownloader.
+DLAGENTS+=("gog::/usr/bin/echo %u - This is is not a real URL, you need to download the GOG file manually to \"$PWD\" or setup a gog:// DLAGENT. Read this PKGBUILD for more information.")
+
+prepare(){
+ # Unzip will produce an error code because it is unable to unzip the Installer.
+ # Therefore, a conditional into a no-op command will keep the PKGBUILD from failing
+ # Of course, if you have any real problems unzipping the PKGBUILD will not abort.
+ unzip "${pkgname//-/_}_${pkgver}.sh" || :
+
+ cd "${srcdir}"
+ echo $PWD
+ patch -Np0 < ../gog-spacechem.patch
+
+ cd "${srcdir}/data/noarch"
+ sed -r -i \
+ 's/(CURRENT_DIR="\$\( cd "\$\( dirname )'`
+ `'"\$\{BASH_SOURCE\[0\]\}"(.*$)'`
+ `'/\1$( readlink -nf "${BASH_SOURCE[0]}" )\2/' \
+ "start.sh"
+}
+
+package(){
+ cd "${srcdir}/data/noarch"
+ # Install game
+ install -d "${pkgdir}/opt/${pkgname}/"
+ install -d "${pkgdir}/opt/${pkgname}/support"
+ install -d "${pkgdir}/usr/bin/"
+ cp -r "game/" "${pkgdir}/opt/${pkgname}/"
+ cp -r "lib/" "${pkgdir}/opt/${pkgname}/lib/"
+ install -Dm755 "start.sh" "gameinfo" "${pkgdir}/opt/${pkgname}/"
+ install -Dm755 support/*.{sh,shlib} "${pkgdir}/opt/${pkgname}/support"
+
+ # Desktop integration
+ install -Dm 644 "support/icon.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -Dm644 "docs/End User License Agreement.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ ln -s "/opt/${pkgname}/start.sh" "${pkgdir}/usr/bin/${pkgname}"
+}
diff --git a/gog-spacechem.desktop b/gog-spacechem.desktop
new file mode 100644
index 000000000000..3c962f0f125b
--- /dev/null
+++ b/gog-spacechem.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Spacechem
+Comment=A puzzle game where you build elaborate chemical factories.
+Exec=gog-spacechem
+Icon=gog-spacechem
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Application;Game;AudioVideo;
diff --git a/gog-spacechem.patch b/gog-spacechem.patch
new file mode 100644
index 000000000000..334c4894987c
--- /dev/null
+++ b/gog-spacechem.patch
@@ -0,0 +1,7 @@
+diff -aur data/noarch/game/spacechem-launcher.sh data/noarch/game/spacechem-launcher.sh
+--- data/noarch/game/spacechem-launcher.sh 2016-08-11 21:03:28.074938768 -0500
++++ data/noarch/game/spacechem-launcher.sh 2016-08-12 09:33:12.472200622 -0500
+@@ -1,2 +1,2 @@
+ #!/bin/sh
+-MONO_CFG_DIR=etc MONO_PATH=monolib ./mono SpaceChem.exe
++LD_LIBRARY_PATH=/usr/bin:/usr/lib32:$PWD MONO_CFG_DIR=etc MONO_PATH=monolib ./mono SpaceChem.exe