diff options
Diffstat (limited to 'games/sms_sdl/sms_sdl.SlackBuild')
-rw-r--r-- | games/sms_sdl/sms_sdl.SlackBuild | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/games/sms_sdl/sms_sdl.SlackBuild b/games/sms_sdl/sms_sdl.SlackBuild index 9aa8382f4a..b4faea9300 100644 --- a/games/sms_sdl/sms_sdl.SlackBuild +++ b/games/sms_sdl/sms_sdl.SlackBuild @@ -1,11 +1,22 @@ -#!/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. + # 20160804 bkw: # - fix and enhance sms_sdl.sh (qv), bump BUILD @@ -17,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:-3} +BUILD=${BUILD:-5} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -30,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} @@ -60,11 +78,8 @@ rm -rf $PRGNAM-$SRCVER unzip $CWD/$PRGNAM-$SRCVER-src.zip cd $PRGNAM-$SRCVER 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 -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # Sorry for all the patches, upstream has been unmaintained since 2001 or so. @@ -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 |