diff options
Diffstat (limited to 'games/nevernoid/nevernoid.SlackBuild')
-rw-r--r-- | games/nevernoid/nevernoid.SlackBuild | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/games/nevernoid/nevernoid.SlackBuild b/games/nevernoid/nevernoid.SlackBuild index 6b61b7a4b4..4ca6e9daa9 100644 --- a/games/nevernoid/nevernoid.SlackBuild +++ b/games/nevernoid/nevernoid.SlackBuild @@ -1,15 +1,20 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for nevernoid -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211025 bkw: BUILD=3, new-style icons. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=nevernoid VERSION=${VERSION:-1.2} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -19,7 +24,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -44,7 +53,10 @@ 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" +# Some dumb browsers might save the file with %20 where the spaces belong. +BIRDY="$CWD/watch the birdy.zip" +[ ! -e "$BIRDY" ] && BIRDY="$CWD/watch%20the%20birdy.zip" +unzip "$BIRDY" mv "watch the birdy.map" maps/ chown -R root:root . @@ -73,11 +85,19 @@ cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications # 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. +for px in 16 32 48 64; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size $CWD/$PRGNAM.png $dir/$PRGNAM.png +done + mkdir -p $PKG/usr/share/pixmaps -cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |