summaryrefslogtreecommitdiff
path: root/games/nevernoid/nevernoid.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/nevernoid/nevernoid.SlackBuild')
-rw-r--r--games/nevernoid/nevernoid.SlackBuild32
1 files changed, 24 insertions, 8 deletions
diff --git a/games/nevernoid/nevernoid.SlackBuild b/games/nevernoid/nevernoid.SlackBuild
index 31e846f566..d131d0ba55 100644
--- a/games/nevernoid/nevernoid.SlackBuild
+++ b/games/nevernoid/nevernoid.SlackBuild
@@ -7,18 +7,32 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=nevernoid
-ARCHIVE="NeverNoid_v12_linux_x86.tar.gz"
VERSION=${VERSION:-1.2}
-ARCH=i486 # which might be a lie! (we dunno how it was compiled)
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# Binary-only package, so no CFLAGS here
+case "$ARCH" in
+ i?86) PARCH=x86 ; ARCH=i486 ;;
+ x86_64) PARCH=x64 ;;
+ *) echo "Unsupported ARCH '$ARCH'" 1>&2 ; exit 1 ;;
+esac
+
+PVER=${VERSION//./}
+ARCHIVE="NeverNoid_v${PVER}_linux_${PARCH}.tar.gz"
set -e
@@ -28,12 +42,14 @@ cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$ARCHIVE
cd $PRGNAM
+
+# Upstream fixed a bug in one of the maps, as a separate download.
+unzip $CWD/"watch the birdy.zip"
+mv "watch the birdy.map" maps/
+
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find . -type f -print0 | xargs -0 chmod 644
+find . -type d -print0 | xargs -0 chmod 755
mkdir -p $PKG/usr/libexec $PKG/usr/games $PKG/usr/share/$PRGNAM
install -m0755 -o root -g root $PRGNAM $PKG/usr/libexec