diff options
Diffstat (limited to 'games/neverball/neverball.SlackBuild')
-rw-r--r-- | games/neverball/neverball.SlackBuild | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/games/neverball/neverball.SlackBuild b/games/neverball/neverball.SlackBuild index c6bb39b7f9..9b01469ff3 100644 --- a/games/neverball/neverball.SlackBuild +++ b/games/neverball/neverball.SlackBuild @@ -1,12 +1,12 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Neverball -# Copyright 2007-2009 Frank Caraballo <fecaraballo{at}gmail{dot}com> +# Copyright 2007-2009 Frank Caraballo +# Modified by Brad Hermanson +# Copyright 2023 Johannes Schoepfer, Germany # All rights reserved. # -# Modified by Brad Hermanson <apeitheo@gmail.com> -# # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # @@ -24,27 +24,34 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=neverball BONUS=neverputt VERSION=${VERSION:-1.6.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -72,21 +79,21 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Patch Makefile to change data directory and to make it compile -# with appropriate flags -patch -p1 < $CWD/Makefile.diff || exit 1 +patch -p1 < $CWD/gcc10.patch -make CFLAGS="$SLKCFLAGS" || exit 1 +make LOCALEDIR=/usr/share/locale DATADIR=/usr/share/$PRGNAM \ + CPPFLAGS="$SLKCFLAGS -DNDEBUG" CFLAGS="$SLKCFLAGS" # Fix map permissions that were created by mapc during compile -find data/ -name '*.sol' -exec chmod 644 {} \; +find data/ -name '*.sol' -exec chmod 644 {} + # Delete the .map files that are no longer required -find data/ -name '*.map' -exec rm {} \; +find data/ -name '*.map' -exec rm {} + mkdir -p $PKG/usr/{bin,share/$PRGNAM} -cp -a mapc $PRGNAM $BONUS $PKG/usr/bin || exit 1 -cp -a data/ $PKG/usr/share/$PRGNAM || exit 1 +cp -a mapc $PRGNAM $BONUS $PKG/usr/bin +cp -a data/* $PKG/usr/share/$PRGNAM +cp -a locale $PKG/usr/share/ ( cd dist for i in $PRGNAM $BONUS ; do @@ -100,7 +107,9 @@ cp -a data/ $PKG/usr/share/$PRGNAM || exit 1 install -D -m 0644 ${i}_256.png $PKG/usr/share/icons/hicolor/256x256/apps/$i.png install -D -m 0644 ${i}_512.png $PKG/usr/share/icons/hicolor/512x512/apps/$i.png done - cp -a ${PRGNAM}_replay.png $PKG/usr/share/icons/hicolor/48x48/apps/${PRGNAM}_replay.png + # fix png icon size + convert ${PRGNAM}_replay.png -resize 48x48\! \ + $PKG/usr/share/icons/hicolor/48x48/apps/${PRGNAM}_replay.png install -D -m 0644 neverlogos.svg $PKG/usr/share/icons/hicolor/scalable/apps/neverlogos.svg install -D -m 0644 mapc.1 $PKG/usr/man/man1/mapc.1 install -D -m 0644 $PRGNAM.6 $PKG/usr/man/man6/$PRGNAM.6 @@ -114,7 +123,8 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE.md README.md doc/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE.md README.md doc/{authors.txt,changes.txt,manual.txt,release-notes.md} \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -122,4 +132,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 |