diff options
Diffstat (limited to 'games/higan/higan.SlackBuild')
-rw-r--r-- | games/higan/higan.SlackBuild | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/games/higan/higan.SlackBuild b/games/higan/higan.SlackBuild index caf311dd6a..39d9901f01 100644 --- a/games/higan/higan.SlackBuild +++ b/games/higan/higan.SlackBuild @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for higan # Based on bsnes SlackBuild by Erik Hanson <email removed> # Maintained by Gabriel Magno <email removed> # Modified by Johannes Schoepfer <email removed> -# Modified again & now maintained by B. Watson <yalhcru@gmail.com> +# Modified again & now maintained by B. Watson <urchlay@slackware.uk> # Copyright 2013 Gabriel Magno, Belo Horizonte, MG, Brazil # All rights reserved. @@ -27,6 +27,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230108 bkw: fix PRINT_PACKAGE_NAME. +# 20211101 bkw: v106 BUILD=3 +# - revert to v106! someone other than me upgraded this for higan +# v110, but it turns out that v110 wouldn't actually play any games +# (UI would start up, but no way to map controllers). unless/until I +# straighten this out, this will remain at v106, which I've actually +# successfully played games with. +# - new-style icons. +# - better .desktop files. + +# 20200907 bkw: upstream source moved and changed to .tar.gz, get +# rid of p7zip dependency. BUILD=2. +# 20200529 bkw: add "can't update version" note to README. # 20181211 bkw: # This update would not have happened without assistance and moral support # from Yossi Ne'eman. Thanks! @@ -43,10 +56,13 @@ # - Add man pages. Note to SBo admins: please don't remove my *.rst man # page sources! +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=higan VERSION=${VERSION:-106} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -56,7 +72,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} @@ -82,9 +102,9 @@ SRCNAM=${PRGNAM}_v${VERSION}-source rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM -7z x $CWD/$SRCNAM.7z -cd $SRCNAM +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION # Bletcherous permissions, please don't replace with template code. find . -type d -exec chmod 0755 {} \+ @@ -141,10 +161,21 @@ mkdir -p $PKG/usr/games \ $PKG/usr/share/pixmaps install -s -m 755 $PRGNAM/out/$PRGNAM icarus/out/icarus $PKG/usr/games/ -install -m 644 $PRGNAM/data/$PRGNAM.desktop $PKG/usr/share/applications/ -install -m 644 $PRGNAM/data/$PRGNAM.png $PKG/usr/share/pixmaps/ cp -dr $PRGNAM/systems/* $PKG/usr/share/$PRGNAM/ +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 $PRGNAM/data/$PRGNAM.png $dir/$PRGNAM.png + convert -resize $size icarus/data/icarus.png $dir/icarus.png +done + +for i in $PRGNAM icarus; do + ln -s ../icons/hicolor/48x48/apps/$i.png $PKG/usr/share/pixmaps/$i.png + cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +done + # Man pages by B. Watson. higan.6 is basically the higan-cli.md from the # git repo, reformatted as RST & converted to a man page. icarus.6 was # written from scratch (and doesn't have much to say, you'll notice). @@ -164,4 +195,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 |