diff options
Diffstat (limited to 'games/atari800/atari800.SlackBuild')
-rw-r--r-- | games/atari800/atari800.SlackBuild | 83 |
1 files changed, 67 insertions, 16 deletions
diff --git a/games/atari800/atari800.SlackBuild b/games/atari800/atari800.SlackBuild index 404aaf2b06..a4d603a8f3 100644 --- a/games/atari800/atari800.SlackBuild +++ b/games/atari800/atari800.SlackBuild @@ -1,11 +1,28 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for atari800 -# 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. +# 20240312 bkw: +# - update for v5.2.0. +# - new-style icons. + +# 20220615 bkw: +# - update for 5.0.0. +# - add man page for new cart utility. + +# 20220407 bkw: BUILD=2, strip binary. + +# 20200303 bkw: +# - update for 4.2.0, can still build 3.1.0, 4.0.0, 4.1.0. +# - move binary to /usr/games, man page to section 6. + +# 20191126 bkw: +# - update for v4.1.0. script can still build VERSION=3.1.0 or 4.0.0. + # 20180703 bkw: # - update for v4.0.0. script can still build VERSION=3.1.0 if needed. # - update README to mention the new Altirra OS stuff. @@ -13,10 +30,13 @@ # - don't install INSTALL in /usr/doc. # - minor script tweaks. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=atari800 -VERSION=${VERSION:-4.0.0} +VERSION=${VERSION:-5.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -26,7 +46,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} @@ -45,7 +69,7 @@ else LIBDIRSUFFIX="" fi -# allow bulding without OpenGL, in case someone needs it +# allow building without OpenGL, in case someone needs it if [ "${OPENGL:-yes}" = "yes" ]; then GLWITH="with" else @@ -60,19 +84,18 @@ 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.gz || \ + tar xvf $CWD/$PRGNAM-$VERSION-src.tgz 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 {} \+ + \( -perm /111 -a \! -perm 755 \) -exec chmod 755 {} + -o \ + \! -perm /111 -exec chmod 644 {} + DOCDIR=/usr/doc/$PRGNAM-$VERSION PKGDOCDIR=$PKG/$DOCDIR -cd src +[ ! -f configure ] && cd src # Include some optional extras. The monitor stuff is nice if you're # developing code for the Atari, and the extra sound stuff makes for @@ -95,14 +118,31 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ + --bindir=/usr/games \ --mandir=/usr/man \ --docdir=$DOCDIR \ --build=$ARCH-slackware-linux +# in 4.0.0 and 4.1.0, the --enable-volonlysound is supposed to +# define this, but for some reason it doesn't. +#[ -e src/config.h ] && echo '#define VOL_ONLY_SOUND 1' >> src/config.h +# Unfortunately, forcibly defining it like that, doesn't make the volume +# only sound actually work. Must determine WTF's going on here. + make -make install DOC_DIR=$DOCDIR MAN_DIR=/usr/man/man1 DESTDIR=$PKG -gzip $PKG/usr/man/man1/$PRGNAM.1 +make install-strip DOC_DIR=$DOCDIR MAN_DIR=/usr/man/man1 DESTDIR=$PKG + +# 20200303 bkw: move man page to section 6 (games) +mkdir -p $PKG/usr/man/man6 +sed '/^\.TH *ATARI800 *1/s| 1 | 6 |' $PKG/usr/man/man1/$PRGNAM.1 | \ + gzip -9c > \ + $PKG/usr/man/man6/$PRGNAM.6.gz +rm -rf $PKG/usr/man/man1 + +gzip -9c < $CWD/cart.6 > $PKG/usr/man/man6/cart.6.gz + cat $CWD/$PRGNAM.SlackBuild > $PKGDOCDIR/$PRGNAM.SlackBuild +[ ! -d ../DOC ] && cd src # 'make install' misses a lot of the docs, let's add them. cd ../DOC @@ -116,9 +156,20 @@ cp -a util $PKGDOCDIR # the act/*.act files are palettes from the dark ages, leave them out. -# nice copyright-friendly icon +# nice copyright-friendly icon. +# 20240312 bkw: new-style icons. +for px in 16 22 32 48 64 128; do + sz="${px}x${px}" + dir=$PKG/usr/share/icons/hicolor/$sz/apps + mkdir -p $dir + rsvg-convert --width=$px --height=$px data/atari2.svg > $dir/$PRGNAM.png +done + +mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps +cat data/atari2.svg > $PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg + mkdir -p $PKG/usr/share/pixmaps -cat data/atari2.png > $PKG/usr/share/pixmaps/$PRGNAM.png +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # .desktop file written for this build mkdir -p $PKG/usr/share/applications @@ -129,4 +180,4 @@ sed "s,@WITH@,$GLWITH," $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 |