summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/bastet/README3
-rw-r--r--games/bastet/bastet.SlackBuild38
-rw-r--r--games/bastet/bastet.info6
-rw-r--r--games/bastet/doinst.sh19
4 files changed, 50 insertions, 16 deletions
diff --git a/games/bastet/README b/games/bastet/README
index fc13b9f45e..76d992edd3 100644
--- a/games/bastet/README
+++ b/games/bastet/README
@@ -8,7 +8,8 @@ Linux. Instead of choosing the next block randomly, this fiendish program
uses a special algorithm to give you the worst possible brick. Playing
Bastet can be a very frustrating experience!
-bonus points for presenting it to your friends as "just another Tetris clone"
+Bonus points for presenting it to your friends as "just another Tetris
+clone".
If you're in X and have TERM set to "xterm-color", the text cursor will
stay enabled, which looks a little weird. Use "xterm" or "xterm-256color"
diff --git a/games/bastet/bastet.SlackBuild b/games/bastet/bastet.SlackBuild
index c00b9b5651..370b08a71c 100644
--- a/games/bastet/bastet.SlackBuild
+++ b/games/bastet/bastet.SlackBuild
@@ -4,8 +4,16 @@
# Written by B. Watson (yalhcru@gmail.com)
+# 20140825 bkw:
+# - update for 0.43.1
+# - install binary in /usr/games instead of /usr/bin
+# - upstream includes a .desktop file, install it
+# - install binary setgid games so we get systemide high score file
+# - add doinst.sh (the two items above need it)
+# - don't install INSTALL in /usr/doc (redundant)
+
PRGNAM=bastet
-VERSION=${VERSION:-0.43}
+VERSION=${VERSION:-0.43.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,7 +50,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
+unzip $CWD/$VERSION.zip || unzip $CWD/$PRGNAM-$VERSION.zip
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -54,27 +62,33 @@ find -L . \
# Don't want/need debugging binary
sed -i 's/-ggdb//g' Makefile
+# keep high-score file in a private dir
+sed -i "s,/var/games,&/$PRGNAM," Config.cpp $PRGNAM.6
+
make CXXFLAGS="$SLKCFLAGS"
-# No 'make install', follow the INSTALL document more-or-less.
-# Binary is not installed setgid games, so high scores won't be
-# shared between users. I tried to make it work, but it didn't,
-# if someone wants to fix it & send me a patch I'll include it
-# next update.
+# No 'make install', follow the INSTALL document more-or-less, except I
+# used a private /var/games/bastet/ dir instead of /var/games for the
+# high score file.
-mkdir -p $PKG/usr/bin $PKG/usr/man/man6
-install -m0755 -oroot -ggames -s $PRGNAM $PKG/usr/bin/$PRGNAM
+VARDIR=$PKG/var/games/$PRGNAM
+mkdir -p $VARDIR
+touch $VARDIR/$PRGNAM.scores2.new
+chown root:games $VARDIR $VARDIR/$PRGNAM.scores2.new
+chmod 664 $VARDIR/$PRGNAM.scores2.new
+mkdir -p $PKG/usr/games $PKG/usr/man/man6 $PKG/usr/share/applications
+install -m2755 -oroot -ggames -s $PRGNAM $PKG/usr/games/$PRGNAM
+cat $PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
gzip -c < $PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS LICENSE NEWS README INSTALL LICENSE \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS NEWS README LICENSE $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/bastet/bastet.info b/games/bastet/bastet.info
index baa9863cea..93bbfcad11 100644
--- a/games/bastet/bastet.info
+++ b/games/bastet/bastet.info
@@ -1,8 +1,8 @@
PRGNAM="bastet"
-VERSION="0.43"
+VERSION="0.43.1"
HOMEPAGE="http://fph.altervista.org/prog/bastet.html"
-DOWNLOAD="http://fph.altervista.org/prog/files/bastet-0.43.tgz"
-MD5SUM="b47090daa7b6d89b98b5b477cf155733"
+DOWNLOAD="https://github.com/fph/bastet/archive/0.43.1.zip"
+MD5SUM="8d0a325d0c94fbb921d6a46f574f3a87"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/games/bastet/doinst.sh b/games/bastet/doinst.sh
new file mode 100644
index 0000000000..2e4f15942f
--- /dev/null
+++ b/games/bastet/doinst.sh
@@ -0,0 +1,19 @@
+
+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 var/games/bastet/bastet.scores2.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi