diff options
author | Alex Szczuczko | 2015-06-10 19:24:41 +0100 |
---|---|---|
committer | Alex Szczuczko | 2015-06-10 19:24:41 +0100 |
commit | 482335aa7b34bbe9494cf753b05e9e6d69c2b0a3 (patch) | |
tree | 4248ad3791c447ea89b6f3af572508fa78e9a4e0 | |
download | aur-gunpoint.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 73 | ||||
-rw-r--r-- | gunpoint.desktop | 13 | ||||
-rw-r--r-- | launch-gunpoint.sh | 36 |
5 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..560423ac4095 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = gunpoint + pkgdesc = A stealth puzzle game that lets you rewire its levels to trick people + pkgver = 1410971363 + pkgrel = 1 + url = http://www.gunpointgame.com/ + arch = i686 + arch = x86_64 + license = custom:commercial + depends = libogg + depends = libvorbis + depends = libxrandr + depends = nvidia-cg-toolkit + depends = openal + depends = glibc + depends = gcc-libs + depends = libx11 + depends = libpng12 + depends = libxcb + depends = libxext + depends = zlib + depends = libxau + depends = libxdmcp + depends = libgl + source = gunpoint.desktop + source = launch-gunpoint.sh + source = GunpointLinux_170914_1410971363.tar.gz::hib://GunpointLinux_170914_1410971363.tar.gz + sha256sums = a43f225c31e995fd6b0225a7743755d991df1b4f45b26ab54d919194f549553e + sha256sums = 9e98fd2445561db881c1a555a5141fa0fae18c14ca738dd73ba7d33b781dfa7a + sha256sums = 8fe96b3402a48eed890155479138ef84f31b238c9631f5833ca377d08af0e3bd + +pkgname = gunpoint + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..58da95d50ccf --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.swp +*.tar.bz2 +*.tar.xz +*.tar +/extract diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..86cf5009c32a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,73 @@ +# Maintainer: Alex Szczuczko <alex@szc.ca> + +pkgname=gunpoint +pkgver=1410971363 +pkgrel=1 +pkgdesc="A stealth puzzle game that lets you rewire its levels to trick people" +arch=("i686" "x86_64") +url="http://www.gunpointgame.com/" +license=("custom:commercial") +depends=() +source=("${pkgname}.desktop" + "launch-${pkgname}.sh" + "GunpointLinux_170914_${pkgver}.tar.gz::hib://GunpointLinux_170914_${pkgver}.tar.gz") +sha256sums=("a43f225c31e995fd6b0225a7743755d991df1b4f45b26ab54d919194f549553e" + "9e98fd2445561db881c1a555a5141fa0fae18c14ca738dd73ba7d33b781dfa7a" + "8fe96b3402a48eed890155479138ef84f31b238c9631f5833ca377d08af0e3bd") + +# hib scheme catch-all +DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Manually download it to \"$(pwd)\", or set up a hib:// DLAGENT in /etc/makepkg.conf."; exit 1') + +# Modify depends for the arch type +if [ "$CARCH" = "x86_64" ] +then + depends+=('lib32-libogg' 'lib32-libvorbis' 'lib32-libxrandr' 'lib32-nvidia-cg-toolkit' 'lib32-openal' 'lib32-glibc' 'lib32-gcc-libs' 'lib32-libx11' 'lib32-libpng12' 'lib32-libxcb' 'lib32-libxext' 'lib32-zlib' 'lib32-libxau' 'lib32-libxdmcp' 'lib32-libgl') +else + depends+=('libogg' 'libvorbis' 'libxrandr' 'nvidia-cg-toolkit' 'openal' 'glibc' 'gcc-libs' 'libx11' 'libpng12' 'libxcb' 'libxext' 'zlib' 'libxau' 'libxdmcp' 'libgl') +fi + +# Disable compression of the package +PKGEXT='.pkg.tar' + +package() { + # Binaries + install -Dm755 "$srcdir/Gunpoint/Gunpoint" "$pkgdir/opt/$pkgname/Gunpoint" + install -m644 -t "$pkgdir/opt/$pkgname/" "$srcdir/Gunpoint/Gunpoint.wad" + + # Levels + install -m755 -d "$pkgdir/opt/$pkgname/Levels/Template/" + install -m644 -t "$pkgdir/opt/$pkgname/Levels/Template/" "$srcdir/Gunpoint/Levels/Template/Template.lvl" + + # Music + install -m755 -d "$pkgdir/opt/$pkgname/Music/" + find "$srcdir/Gunpoint/Music/" -maxdepth 1 -type f -print0 | \ + xargs -0 install -m644 -t "$pkgdir/opt/$pkgname/Music/" + + # Scripts + install -m755 -d "$pkgdir/opt/$pkgname/Scripts/" + find "$srcdir/Gunpoint/Scripts/" -maxdepth 1 -type f -print0 | \ + xargs -0 install -m644 -t "$pkgdir/opt/$pkgname/Scripts/" + + # Launcher + install -m755 -t "$pkgdir/opt/$pkgname/" "$srcdir/launch-gunpoint.sh" + + # + # System integration + # + + # /bin + install -m755 -d "$pkgdir/usr/bin/" + ln -s "/opt/$pkgname/launch-gunpoint.sh" "$pkgdir/usr/bin/$pkgname" + + # License + #install -m755 -d "$pkgdir/usr/share/licenses/$pkgname/" + #ln -s "/opt/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # Icon + #install -m755 -d "$pkgdir/usr/share/pixmaps/" + #ln -s "/opt/$pkgname/Gunpoint.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png" + + # .desktop File + install -m755 -d "$pkgdir/usr/share/applications/" + install -m644 -t "$pkgdir/usr/share/applications/" "$srcdir/${pkgname}.desktop" +} diff --git a/gunpoint.desktop b/gunpoint.desktop new file mode 100644 index 000000000000..89b41e39cc96 --- /dev/null +++ b/gunpoint.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Icon=/usr/share/pixmaps/gunpoint.png +Exec=/usr/bin/gunpoint +Terminal=false +StartupNotify=false + +Name=Gunpoint +Comment=A stealth puzzle game that lets you rewire its levels to trick people + +Categories=Game; + diff --git a/launch-gunpoint.sh b/launch-gunpoint.sh new file mode 100644 index 000000000000..f93b38e264f2 --- /dev/null +++ b/launch-gunpoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# This is a wrapper that works around the application's single-user design for multi-user systems. + +set -e +set -u + +game_dir="/opt/gunpoint" +: ${XDG_DATA_HOME:=$HOME/.local/share} +user_dir="$XDG_DATA_HOME/gunpoint" + +make_user_dir() { + echo "Creating a user directory for the game. This only needs to be done once, future runs will skip this step." + + mkdir -p "$user_dir/" + + # Read-only + ln -s -t "$user_dir/" "$game_dir/Gunpoint" "$game_dir/Gunpoint.wad" "$game_dir/Levels" "$game_dir/Music" "$game_dir/Scripts" + + # Read/Write + # Savegames and Settings created by game on first launch + + echo "User directory has been created." +} + +launch_game() { + cd "$user_dir" + ./Gunpoint +} + +if [ ! -f "$user_dir/Gunpoint" ] +then + make_user_dir +fi + +launch_game |