2010-05-12 23:29:28 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for nevernoid
|
|
|
|
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
|
2013-01-02 02:31:40 +01:00
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2010-05-12 23:29:28 +02:00
|
|
|
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}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
# Binary-only package, so no CFLAGS here
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM
|
|
|
|
tar xvf $CWD/$ARCHIVE
|
|
|
|
cd $PRGNAM
|
|
|
|
chown -R root:root .
|
2013-11-25 12:23:31 +01:00
|
|
|
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 {} \;
|
2010-05-12 23:29:28 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/libexec $PKG/usr/games $PKG/usr/share/$PRGNAM
|
|
|
|
install -m0755 -o root -g root $PRGNAM $PKG/usr/libexec
|
|
|
|
cp -r fonts maps music sounds sprites $PKG/usr/share/$PRGNAM
|
|
|
|
|
|
|
|
# game expects to be run from within its data directory like a windows app,
|
|
|
|
# and expects to write highscore/settings data to the same place. Wrapper
|
|
|
|
# script allows system-wide installation with per-user data.
|
|
|
|
install -m0755 -o root -g root $CWD/$PRGNAM.wrapper $PKG/usr/games/$PRGNAM
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
sed 's/\r//g' readme.txt > $PKG/usr/doc/$PRGNAM-$VERSION/readme.txt
|
|
|
|
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
|
|
|
|
|
|
|
|
# Oddly, there's no win32 icon for this game...
|
|
|
|
# Don't laugh, I made this icon from a screenshot of the title screen
|
|
|
|
# in the gimp. Took about 10 minutes plus lots of cussing & head-scratching.
|
|
|
|
# If anyone who actually knows anything at all about graphic design would
|
|
|
|
# like to do a better icon, email me.
|
|
|
|
mkdir -p $PKG/usr/share/pixmaps
|
|
|
|
cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:26:46 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|