diff options
Diffstat (limited to 'games/wolf4sdl/wolf4sdl.SlackBuild')
-rw-r--r-- | games/wolf4sdl/wolf4sdl.SlackBuild | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/games/wolf4sdl/wolf4sdl.SlackBuild b/games/wolf4sdl/wolf4sdl.SlackBuild index 0e5ec3b686..b09ba8af91 100644 --- a/games/wolf4sdl/wolf4sdl.SlackBuild +++ b/games/wolf4sdl/wolf4sdl.SlackBuild @@ -6,11 +6,13 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211015 bkw: BUILD=2, new-style icons. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wolf4sdl VERSION=${VERSION:-1.7} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +24,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -59,11 +58,8 @@ rm -rf $SRCNAM-$VERSION-src unzip $CWD/$SRCNAM-$VERSION-src.zip cd $SRCNAM-$VERSION-src 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 {} \+ # look for game data files in /usr/share/games/wolf3d zcat $CWD/datadir.diff.gz | patch -p1 @@ -123,18 +119,29 @@ mv *.sdm $PKG/usr/share/games/wolf3d chmod 644 $PKG/usr/share/games/wolf3d/*.sdm # man page written for this build -mkdir -p $PKG/usr/man/man6 -gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz -ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-demo.6.gz -ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-full.6.gz -ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-demo.6.gz -ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-full.6.gz - -# icon came from gods know where (somewhere on upstream site) -# .desktop files written for this build +PKGMAN6=$PKG/usr/man/man6 +mkdir -p $PKGMAN6 +gzip -9c < $CWD/$PRGNAM.6 > $PKGMAN6/$PRGNAM.6.gz +for i in {wolf,spear}-{demo,full}; do + ln -s $PRGNAM.6.gz $PKGMAN6/$PRGNAM-$i.6.gz +done + +# Icons extracted from macosx/wolf4sdl.icns with icns2png. +# 48.png scaled down from 512.png with 'convert -resize'. +# Don't install 256x256 or 512x512 icons. +for i in $CWD/icons/*.png; do + px=$( basename $i | cut -d. -f1 ) + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done + mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# .desktop files written for this build. cp $CWD/*.desktop $PKG/usr/share/applications/ -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a Changes.txt README.txt license-*.txt $PKG/usr/doc/$PRGNAM-$VERSION |