diff options
Diffstat (limited to 'games/sms_sdl/sms_sdl.SlackBuild')
-rw-r--r-- | games/sms_sdl/sms_sdl.SlackBuild | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/games/sms_sdl/sms_sdl.SlackBuild b/games/sms_sdl/sms_sdl.SlackBuild index 40e3374897..b4faea9300 100644 --- a/games/sms_sdl/sms_sdl.SlackBuild +++ b/games/sms_sdl/sms_sdl.SlackBuild @@ -1,11 +1,19 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for sms_sdl -# 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. +# 20230107 bkw: BUILD=5, fix doinst.sh. + +# 20211024 bkw: BUILD=4 +# - made a new icon, hopefully better looking. +# - new-style icons. +# - wrapper script: create default config if no config found. +# - expand man page a bit. + # 20200104 bkw: # - Whoops! The sms_sdl.png icon was actually a .gif. Fix & bump BUILD. @@ -20,10 +28,13 @@ # of including our own custom mime types. Since Slackware already has # this mime type, get rid of the option to disable mime. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=sms_sdl VERSION=${VERSION:-0.9.4a_r7.1} -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -33,7 +44,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} @@ -108,14 +123,25 @@ mkdir -p $PKG/usr/man/man6 sed "s/\<VERSION\>/$VERSION/g" < $CWD/$PRGNAM.6 | \ gzip -9c > $PKG/usr/man/man6/$PRGNAM.6.gz -# icon by finite (see REAME), desktop written for this build. +# .desktop written for this build. mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +# 20211024 bkw: created a new icon, the old one didn't scale down +# well, plus it was too dark. I'm still not a graphic designer, feel +# free to send me a better one. +for px in 16 32 48 64 128; 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 + +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/install cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc 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 |