diff options
author | Carsten Teibes | 2014-08-28 12:40:15 +0200 |
---|---|---|
committer | Carsten Teibes | 2014-08-28 12:40:15 +0200 |
commit | cdb282db353e91dbca9a316db7d88315c59a3d4d (patch) | |
tree | 24172474513453ae2e3ee687895ecb5eaa3a88c4 | |
parent | de3134e960da8bbc6e2e99f2e83d038d6784e5dc (diff) | |
download | aur-cdb282db353e91dbca9a316db7d88315c59a3d4d.tar.gz |
Rework all retroguru games
All data is saved in the home directory now.
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | sqrxz2.desktop | 4 | ||||
-rw-r--r-- | sqrxz2.install | 16 | ||||
-rw-r--r-- | sqrxz2.sh | 21 |
5 files changed, 47 insertions, 40 deletions
@@ -1,8 +1,8 @@ pkgbase = sqrxz2 - pkgdesc = A fast paced jump'n'run which will please the hardcore gamer amongst you (Part II) + pkgdesc = A fast paced jump'n'run (Part II - 'Two seconds until death') pkgver = 1.00 - pkgrel = 1 - url = http://sqrxz.de/ + pkgrel = 2 + url = http://sqrxz.de install = sqrxz2.install arch = i686 arch = x86_64 @@ -11,14 +11,14 @@ pkgbase = sqrxz2 depends = zlib optdepends = libmodplug: better music decoder options = !strip - source = http://www.retroguru.com/sqrxz2/sqrxz2-v.latest-linux.zip + source = http://www.retroguru.com/sqrxz2/sqrxz2-v.latest-linux.tar.gz source = sqrxz2.png source = sqrxz2.sh source = sqrxz2.desktop - sha256sums = 1eed7c72ab99dc87a02769d28e52927add5e32d55063570bb8f9c3944bbd229b + sha256sums = d8b8a2b649707bbc9d7f16acdee24ab0c2ce63cccd0a1b130a067893ca492150 sha256sums = b5e9ffb25bfd97647cee92baee2d23f63581aa316809a989cdaf036abe0052ee - sha256sums = 0019a50f899f9534c1abc2e0e6519d558d239fa5f0e2c50fdb3d3f23d566c6a0 - sha256sums = e6ac3f94f451d564354f6dd2b5e05f214f15c522d5f31416fc75f5b7c9aba889 + sha256sums = 0468a24a04256865381f5dd0c92dfed4ed6f594270760f32678ebe2cb9bc1b5c + sha256sums = 20ca71769b459034ae89bca1a89e7f4eafbe6a1ad94944bf9d306dee87714d2f pkgname = sqrxz2 @@ -1,46 +1,42 @@ -# Maintainer: carstene1ns <url/mail: arch carsten-teibes de> +# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG pkgname=sqrxz2 pkgver=1.00 -pkgrel=1 -pkgdesc="A fast paced jump'n'run which will please the hardcore gamer amongst you (Part II)" +pkgrel=2 +pkgdesc="A fast paced jump'n'run (Part II - 'Two seconds until death')" arch=('i686' 'x86_64') -url="http://sqrxz.de/" +url="http://sqrxz.de" license=('custom: Freeware') depends=('sdl_mixer' 'zlib') optdepends=('libmodplug: better music decoder') install=$pkgname.install -source=("http://www.retroguru.com/$pkgname/$pkgname-v.latest-linux.zip" +source=("http://www.retroguru.com/$pkgname/$pkgname-v.latest-linux.tar.gz" "$pkgname.png" "$pkgname.sh" "$pkgname.desktop") -sha256sums=('1eed7c72ab99dc87a02769d28e52927add5e32d55063570bb8f9c3944bbd229b' +sha256sums=('d8b8a2b649707bbc9d7f16acdee24ab0c2ce63cccd0a1b130a067893ca492150' 'b5e9ffb25bfd97647cee92baee2d23f63581aa316809a989cdaf036abe0052ee' - '0019a50f899f9534c1abc2e0e6519d558d239fa5f0e2c50fdb3d3f23d566c6a0' - 'e6ac3f94f451d564354f6dd2b5e05f214f15c522d5f31416fc75f5b7c9aba889') + '0468a24a04256865381f5dd0c92dfed4ed6f594270760f32678ebe2cb9bc1b5c' + '20ca71769b459034ae89bca1a89e7f4eafbe6a1ad94944bf9d306dee87714d2f') options=(!strip) package() { # create folders - install -d "$pkgdir"/{opt/$pkgname/data,usr/share/{doc,licenses}/$pkgname} + install -d "$pkgdir"/usr/{lib/$pkgname,share/{{doc,licenses}/$pkgname,$pkgname/data}} - # install architecture dependent executeable + # install architecture dependent executable case $CARCH in i686) - install -m755 ${pkgname}_linux32 "$pkgdir"/opt/$pkgname/$pkgname;; + install -m755 ${pkgname}_linux32 "$pkgdir"/usr/lib/$pkgname/$pkgname;; x86_64) - install -m755 ${pkgname}_linux64 "$pkgdir"/opt/$pkgname/$pkgname;; + install -m755 ${pkgname}_linux64 "$pkgdir"/usr/lib/$pkgname/$pkgname;; esac # install launcher, data, text, icon, desktop and license files install -Dm755 $pkgname.sh "$pkgdir"/usr/bin/$pkgname - install -m644 data/*.zda "$pkgdir"/opt/$pkgname/data + install -m644 data/*.zda "$pkgdir"/usr/share/$pkgname/data install -m644 *.txt "$pkgdir"/usr/share/doc/$pkgname install -Dm644 $pkgname.png "$pkgdir"/usr/share/pixmaps/$pkgname.png install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop - tail -n +25 sqrxz2.txt | head -n 9 > "$pkgdir"/usr/share/licenses/$pkgname/FREEWARE - - # fix permissions - chgrp -R games "$pkgdir"/opt/$pkgname - chmod g+w "$pkgdir"/opt/$pkgname + tail -n +25 $pkgname.txt | head -n 9 > "$pkgdir"/usr/share/licenses/$pkgname/FREEWARE } diff --git a/sqrxz2.desktop b/sqrxz2.desktop index 36d51f98af58..9a60d5de277d 100644 --- a/sqrxz2.desktop +++ b/sqrxz2.desktop @@ -1,8 +1,8 @@ [Desktop Entry] -Name=sqrxz2 +Name=sqrxz2 - Two seconds until death Exec=sqrxz2 Icon=sqrxz2 Type=Application -Comment=A fast paced jump'n'run which will please the hardcore gamer amongst you (Part II). +Comment=A fast paced jump'n'run (Part II). Categories=Game; Terminal=false diff --git a/sqrxz2.install b/sqrxz2.install index 806c8d0d7a57..7ccdbca980b2 100644 --- a/sqrxz2.install +++ b/sqrxz2.install @@ -1,14 +1,10 @@ -post_install() { - echo "You need to be in the games group for save functionality" -} - -post_upgrade() { - post_install -} - post_remove() { - if [ -d /opt/sqrxz2 ]; then - echo "You may safely delete /opt/sqrxz2 and it's contents (config/highscore files) if you don't need them." + echo "You may safely delete the '~/.sqrxz2' directory containing the config/highscore" + echo "files, if you do not want to preserve them." + + # leftover files from old behaviour + if [ -d opt/sqrxz2 ]; then + echo "You may also safely delete /opt/sqrxz2 and it's contents." fi } diff --git a/sqrxz2.sh b/sqrxz2.sh index dac0343d20bf..d17668e67b62 100644 --- a/sqrxz2.sh +++ b/sqrxz2.sh @@ -1,5 +1,20 @@ #!/bin/sh +# +# launcher for retroguru games by carstene1ns 2013-2014 +# -cd /opt/sqrxz2 -./sqrxz2 "$@" -cd - &>/dev/null +# get game from script name +game=`basename $0` + +# create jail folder +mkdir -p "$HOME"/.$game + +# link data folder, if needed +if [ ! -L "$HOME"/.$game/data ]; then + ln -s /usr/share/$game/data "$HOME"/.$game/data +fi + +# change to game dir and launch +cd "$HOME"/.$game && exec /usr/lib/$game/$game "$@" + +# eof |