diff options
author | Dan-Simon Myrland <dansimon@radiotube.org> | 2017-03-24 14:37:03 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-03-25 00:07:32 +0000 |
commit | c4d7eaadaf40edadb9c225830888ab618d355e21 (patch) | |
tree | af54b938e8ca500e35eac510681c3b88a6c57b78 | |
parent | b43ce214467ee83ce999b6272fe652ce427f526e (diff) | |
download | slackbuilds-c4d7eaadaf40edadb9c225830888ab618d355e21.tar.gz |
games/typespeed: Added (ncurses typing game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | games/typespeed/README | 4 | ||||
-rw-r--r-- | games/typespeed/doinst.sh | 14 | ||||
-rw-r--r-- | games/typespeed/slack-desc | 19 | ||||
-rw-r--r-- | games/typespeed/typespeed.SlackBuild | 82 | ||||
-rw-r--r-- | games/typespeed/typespeed.info | 10 |
5 files changed, 129 insertions, 0 deletions
diff --git a/games/typespeed/README b/games/typespeed/README new file mode 100644 index 0000000000..b16abdff70 --- /dev/null +++ b/games/typespeed/README @@ -0,0 +1,4 @@ +Typespeed's idea is ripped from ztspeed (a DOS game made by Zorlim). +The idea behind the game is rather easy: type words that are flying +by from left to right as fast as you can. If you miss 10 or more +words, game is over. diff --git a/games/typespeed/doinst.sh b/games/typespeed/doinst.sh new file mode 100644 index 0000000000..83fdd2e0d1 --- /dev/null +++ b/games/typespeed/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/typespeedrc.new diff --git a/games/typespeed/slack-desc b/games/typespeed/slack-desc new file mode 100644 index 0000000000..3764d04416 --- /dev/null +++ b/games/typespeed/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------------------------------------------------------| +typespeed: typespeed (ncurses typing game) +typespeed: +typespeed: Typespeed's idea is ripped from ztspeed (a DOS game made by Zorlim). +typespeed: The idea behind the game is rather easy: type words that are flying +typespeed: by from left to right as fast as you can. If you miss 10 or more +typespeed: words, game is over. +typespeed: +typespeed: PS! For highscores to work your user must be a member of the games +typespeed: group. +typespeed: +typespeed: diff --git a/games/typespeed/typespeed.SlackBuild b/games/typespeed/typespeed.SlackBuild new file mode 100644 index 0000000000..826254ccdb --- /dev/null +++ b/games/typespeed/typespeed.SlackBuild @@ -0,0 +1,82 @@ +#!/bin/sh +# Slackware build script for talkfilters +# Written by Dan-Simon Myrland <dansimon@radiotube.org> + +PRGNAM=typespeed +VERSION=${VERSION:-0.6.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --bindir=/usr/games \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +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 + +mv $PKG/etc/typespeedrc $PKG/etc/typespeedrc.new + +cp -a \ + ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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:-tgz} diff --git a/games/typespeed/typespeed.info b/games/typespeed/typespeed.info new file mode 100644 index 0000000000..677065b2ea --- /dev/null +++ b/games/typespeed/typespeed.info @@ -0,0 +1,10 @@ +PRGNAM="typespeed" +VERSION="0.6.5" +HOMEPAGE="http://typespeed.sourceforge.net" +DOWNLOAD="http://typespeed.sourceforge.net/typespeed-0.6.5.tar.gz" +MD5SUM="578102b418c7df84903d3e90df2e7483" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Dan-Simon Myrland" +EMAIL="dansimon@radiotube.org" |