diff options
Diffstat (limited to 'games/syobonaction/syobonaction.SlackBuild')
-rw-r--r-- | games/syobonaction/syobonaction.SlackBuild | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/games/syobonaction/syobonaction.SlackBuild b/games/syobonaction/syobonaction.SlackBuild index a56d5832bd..ba799b9743 100644 --- a/games/syobonaction/syobonaction.SlackBuild +++ b/games/syobonaction/syobonaction.SlackBuild @@ -1,18 +1,24 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for syobonaction -# 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. -# The source is hosted on my server to avoid the JS-laden download page -# on codeplex. +# 20211028 bkw: +# - update for 0.2+20210411_f2e8629 (latest git, which uses SDL2, yay!) +# - new-style icons. +# - convert man page to rst, expand it slightly. +# - get rid of CRLFs in docs. + +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=syobonaction -VERSION=${VERSION:-0.2} +VERSION=${VERSION:-0.2+20210411_f2e8629} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -22,7 +28,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} @@ -47,14 +57,11 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION 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 {} \+ DATADIR=/usr/share/games/$PRGNAM BINDIR=/usr/games @@ -70,15 +77,24 @@ cp -r data/*/ $PKG/$DATADIR mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop -# icon extracted from macosx/SyobonAction.icns with icns2png +# icons extracted from macosx/SyobonAction.icns with icns2png +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/pixmaps -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # man page written for this build mkdir -p $PKG/usr/man/man6 gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +sed -i 's,\r,,' data/*.txt cp -a data/*.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -87,4 +103,4 @@ 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 |