diff options
-rw-r--r-- | games/bsd-tetris/README | 7 | ||||
-rw-r--r-- | games/bsd-tetris/bsd-tetris.SlackBuild | 113 | ||||
-rw-r--r-- | games/bsd-tetris/bsd-tetris.desktop | 9 | ||||
-rw-r--r-- | games/bsd-tetris/bsd-tetris.info | 10 | ||||
-rw-r--r-- | games/bsd-tetris/doinst.sh | 23 | ||||
-rw-r--r-- | games/bsd-tetris/icon.png | bin | 0 -> 9803 bytes | |||
-rw-r--r-- | games/bsd-tetris/slack-desc | 19 |
7 files changed, 181 insertions, 0 deletions
diff --git a/games/bsd-tetris/README b/games/bsd-tetris/README new file mode 100644 index 0000000000..c5849b4bce --- /dev/null +++ b/games/bsd-tetris/README @@ -0,0 +1,7 @@ +bsd-tetris (falling block game that runs in a terminal) + +bsd-tetris is a clone of Tetris for terminals. It uses vi keystokes +for movement. + +This game was in the y/tetris package in Slackware versions up to 3.2. +It was removed before the 3.3 release (on July 7, 1997). diff --git a/games/bsd-tetris/bsd-tetris.SlackBuild b/games/bsd-tetris/bsd-tetris.SlackBuild new file mode 100644 index 0000000000..3ce8453b69 --- /dev/null +++ b/games/bsd-tetris/bsd-tetris.SlackBuild @@ -0,0 +1,113 @@ +#!/bin/bash + +# Slackware build script for bsd-tetris + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=bsd-tetris +VERSION=${VERSION:-2.17} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=bsd-games + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.lz --strip-components=2 --wildcards '*/tetris' +chown -R root:root . +chmod 644 * + +# The Makefile.bsd is b0rked, can't build with either pmake or bmake. +# So simple that there's no need for a Makefile anyway. + +SCOREDIR=/var/games/bsd-tetris +SCOREFILE=$SCOREDIR/tetris.scores +EXE=$PKG/usr/games/tetris +MAN6=$PKG/usr/man/man6 +APPS=$PKG/usr/share/applications + +mkdir -p $PKG/usr/games $MAN6 $APPS + +echo "#define _PATH_SCOREFILE \"$SCOREFILE\"" > pathnames.h + +set -x +${CC:-gcc} -o $EXE $SLKCFLAGS -Wl,-s -DINFTIM=-1 -Dlint -DOXTABS=XTABS *.c -ltermcap +set +x + +sed "s,@tetris_scorefile@,$SCOREFILE," < tetris.6.in | gzip -9c > $MAN6/tetris.6.gz + +# Package is called bsd-tetris, so make sure it can be called that way. +ln -s tetris $PKG/usr/games/$PRGNAM +ln -s tetris.6.gz $MAN6/$PRGNAM.6.gz + +# The game runs setgid games, so it can write to the high score file. +mkdir -p $PKG/$SCOREDIR +touch $PKG/$SCOREFILE.new +chown root:games $PKG/$SCOREDIR $PKG/$SCOREFILE.new $EXE +chmod 775 $PKG/$SCOREDIR +chmod 664 $PKG/$SCOREFILE.new +chmod 2751 $EXE + +# .desktop file written for this SlackBuild. +cat $CWD/$PRGNAM.desktop > $APPS/$PRGNAM.desktop + +# Icon created for this SlackBuild. +for i in 32 48 64 128; do + sz=${i}x${i} + dir=$PKG/usr/share/icons/hicolor/$sz/apps + mkdir -p $dir + convert -resize $sz $CWD/icon.png $dir/$PRGNAM.png +done + +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cat $CWD/README > $PKGDOC/README +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +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 diff --git a/games/bsd-tetris/bsd-tetris.desktop b/games/bsd-tetris/bsd-tetris.desktop new file mode 100644 index 0000000000..776421afed --- /dev/null +++ b/games/bsd-tetris/bsd-tetris.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=BSD Tetris +GenericName=Puzzle Game +Exec=/usr/games/bsd-tetris +Icon=bsd-tetris +Terminal=true +Type=Application +Categories=Game;ArcadeGame; +Keywords=game;arcade; diff --git a/games/bsd-tetris/bsd-tetris.info b/games/bsd-tetris/bsd-tetris.info new file mode 100644 index 0000000000..a1b57a80e3 --- /dev/null +++ b/games/bsd-tetris/bsd-tetris.info @@ -0,0 +1,10 @@ +PRGNAM="bsd-tetris" +VERSION="2.17" +HOMEPAGE="http://ftp.slackware.com/pub/slackware/slackware-15.0/source/y/bsd-games/" +DOWNLOAD="http://ftp.slackware.com/pub/slackware/slackware-15.0/source/y/bsd-games/bsd-games-2.17.tar.lz" +MD5SUM="8d719fc11841310d0c5a0267729609ef" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/games/bsd-tetris/doinst.sh b/games/bsd-tetris/doinst.sh new file mode 100644 index 0000000000..9c024f4e73 --- /dev/null +++ b/games/bsd-tetris/doinst.sh @@ -0,0 +1,23 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config var/games/bsd-tetris/tetris.scores.new +chown root:games var/games/bsd-tetris/tetris.scores +chmod 664 var/games/bsd-tetris/tetris.scores + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/bsd-tetris/icon.png b/games/bsd-tetris/icon.png Binary files differnew file mode 100644 index 0000000000..cf80c3593a --- /dev/null +++ b/games/bsd-tetris/icon.png diff --git a/games/bsd-tetris/slack-desc b/games/bsd-tetris/slack-desc new file mode 100644 index 0000000000..4c9c95611a --- /dev/null +++ b/games/bsd-tetris/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +bsd-tetris: bsd-tetris (falling block game that runs in a terminal) +bsd-tetris: +bsd-tetris: bsd-tetris is a clone of Tetris for terminals. It uses vi keystokes +bsd-tetris: for movement. +bsd-tetris: +bsd-tetris: This game was in the y/tetris package in Slackware versions up to 3.2. +bsd-tetris: It was removed before the 3.3 release (on July 7, 1997). +bsd-tetris: +bsd-tetris: +bsd-tetris: +bsd-tetris: |