diff options
author | Steven A. McIntosh (samac) <mcintosh@cotterochan.co.uk> | 2010-05-12 23:29:39 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:29:39 +0200 |
commit | 2ee6efb7ac6524023c4cdefe0d7ad1e42d91713d (patch) | |
tree | cf4ff72449ad058d7a2c7198ef2f7e30acb8dc0e /games/xscrabble | |
parent | 0d04e5cade8c2d04385f23e49b3e72fbd954134e (diff) | |
download | slackbuilds-2ee6efb7ac6524023c4cdefe0d7ad1e42d91713d.tar.gz |
games/xscrabble: Added to 12.2 repository
Diffstat (limited to 'games/xscrabble')
-rw-r--r-- | games/xscrabble/README | 10 | ||||
-rw-r--r-- | games/xscrabble/doinst.sh | 14 | ||||
-rw-r--r-- | games/xscrabble/slack-desc | 19 | ||||
-rw-r--r-- | games/xscrabble/xscrabble.SlackBuild | 105 | ||||
-rw-r--r-- | games/xscrabble/xscrabble.desktop | 9 | ||||
-rw-r--r-- | games/xscrabble/xscrabble.info | 8 | ||||
-rw-r--r-- | games/xscrabble/xscrabble.png | bin | 0 -> 3443 bytes |
7 files changed, 165 insertions, 0 deletions
diff --git a/games/xscrabble/README b/games/xscrabble/README new file mode 100644 index 0000000000..67b012bbb4 --- /dev/null +++ b/games/xscrabble/README @@ -0,0 +1,10 @@ +Xscrabble project is an internationalized version of the Xscrabble +program. It is an enhancement of Matt Chapman's original Xscrabble +which is a networked scrabble implementation for the X Window System. + +Among other things, version 2 adds internationalization features. English +and French are currently supported (the dictionary files should be downloaded +separately from the main package). You must have at least one of the +dictionary files present when building the package; obtain them here: + ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_en.tar.bz2 + ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_fr.tar.bz2 diff --git a/games/xscrabble/doinst.sh b/games/xscrabble/doinst.sh new file mode 100644 index 0000000000..e3181a71a9 --- /dev/null +++ b/games/xscrabble/doinst.sh @@ -0,0 +1,14 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +for i in en fr ; do + if [ -d var/games/scrabble/$i ]; then + if [ ! -e var/games/scrabble/$i/scrabble_scores ]; then + mv var/games/scrabble/$i/scrabble_scores.new var/games/scrabble/$i/scrabble_scores + else + rm -f var/games/scrabble/$i/scrabble_scores.new + fi + fi +done + diff --git a/games/xscrabble/slack-desc b/games/xscrabble/slack-desc new file mode 100644 index 0000000000..790faeb2bc --- /dev/null +++ b/games/xscrabble/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 ':'. + + |-----handy-ruler-----------------------------------------------------| +xscrabble: Xscrabble (X-based Scrabble Game) +xscrabble: +xscrabble: Xscrabble project is an internationalized version of the Xscrabble +xscrabble: program. It is an enhancement of Matt Chapman's original Xscrabble +xscrabble: which is a networked scrabble implementation for the X Window System. +xscrabble: Among other things, version 2 adds internationalization features. +xscrabble: English and French are currently supported (the dictionary +xscrabble: files should be downloaded separately from the main package). +xscrabble: +xscrabble: Homepage: ftp://ftp.ac-grenoble.fr/ge/educational_games/ +xscrabble: diff --git a/games/xscrabble/xscrabble.SlackBuild b/games/xscrabble/xscrabble.SlackBuild new file mode 100644 index 0000000000..ffbd8a60f8 --- /dev/null +++ b/games/xscrabble/xscrabble.SlackBuild @@ -0,0 +1,105 @@ +#!/bin/sh + +# Slackware build script for Xscrabble +# Written by Steven A. McIntosh (samac) (mcintosh@cotterochan.co.uk) +# Modified by Robby Workman <rworkman@slackbuilds.org> + +PRGNAM=xscrabble +VERSION=2.12 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +DEFAULT_LANG=${DEFAULT_LANG:-en} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +rm -fr $TMP/$PRGNAM $PKG $TMP/$PRGNAM-$VERSION +mkdir -p $TMP $PKG $OUTPUT +cd $TMP || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod 0755 . +chmod -R u+w,go+r-w,a-s . + +# The included "build" script isn't exactly ideal, so we'll do it ourselves +printf \ +"#define VERSION $(printf $VERSION|tr -d \.) +#define DICT_FILE \"/usr/share/games/scrabble/en/OSPD3.gz\" +#define SCORE_FILE \"/var/games/scrabble/en/scrabble_scores\" +#define RULES_FILE \"/usr/share/games/scrabble/en/scrabble_rules\"\n" \ + > src/config.h +xmkmf -a +make + +mkdir -p $PKG/usr/games +cp -a src/xscrab src/xscrabble $PKG/usr/games +chown root:games $PKG/usr/games/* +chmod 2755 $PKG/usr/games/* + +mkdir -p $PKG/var/games/scrabble/{en,fr} +chown -R root:games $PKG/var/games/scrabble +chmod -R 2775 $PKG/var/games/scrabble + +mkdir -p $PKG/etc/X11/app-defaults $PKG/usr/share/games/scrabble/{en,fr} + +install_english() { + tar xf $CWD/xscrabble_en.tar.bz2 + mv xscrabble_en/lib/* $PKG/usr/share/games/scrabble/en + rm -f $PKG/usr/share/games/scrabble/en/scrabble_scores + ( cd $PKG/usr/share/games/scrabble/en + ln -fs /var/games/scrabble/en/scrabble_scores . + ) + touch $PKG/var/games/scrabble/en/scrabble_scores.new + chmod 0664 $PKG/var/games/scrabble/en/scrabble_scores.new + mv xscrabble_en/app-defaults/XScrabble_en \ + $PKG/etc/X11/app-defaults/XScrabble_en + ( cd $PKG/etc/X11/app-defaults ; ln -fs XScrabble_en XScrabble ) +} +install_french() { + tar xf $CWD/xscrabble_fr.tar.bz2 + mv xscrabble_fr/lib/* $PKG/usr/share/games/scrabble/fr + rm -f $PKG/usr/share/games/scrabble/fr/scrabble_scores + ( cd $PKG/usr/share/games/scrabble/fr + ln -fs /var/games/scrabble/fr/scrabble_scores . + ) + touch $PKG/var/games/scrabble/fr/scrabble_scores.new + chmod 0664 $PKG/var/games/scrabble/fr/scrabble_scores.new + mv xscrabble_fr/app-defaults/XScrabble_fr \ + $PKG/etc/X11/app-defaults/XScrabble_fr + ( cd $PKG/etc/X11/app-defaults ; ln -fs XScrabble_fr XScrabble ) +} + +if [ -e $CWD/xscrabble_en.tar.bz2 -a -e $CWD/xscrabble_fr.tar.bz2 ]; then + if [ "$DEFAULT_LANG" = "en" ]; then + install_french + install_english + else + install_english + install_french + fi +elif [ -e $CWD/xscrabble_fr.tar.bz2 ]; then + install_french +elif [ -e $CWD/xscrabble_en.tar.bz2 ]; then + install_english +else + printf "You need to have at least one language pack - get them here:\n" + printf "ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_en.tar.bz2\n" + printf "ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_fr.tar.bz2\n" + exit 1 +fi + +mkdir -p $PKG/usr/share/{applications,pixmaps} +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +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.tgz diff --git a/games/xscrabble/xscrabble.desktop b/games/xscrabble/xscrabble.desktop new file mode 100644 index 0000000000..d7c20ca023 --- /dev/null +++ b/games/xscrabble/xscrabble.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=xscrabble +Comment=A Scrabble-like game +Exec=xscrabble +TryExec=xscrabble +Icon=xscrabble +Terminal=false +Type=Application +Categories=Game; diff --git a/games/xscrabble/xscrabble.info b/games/xscrabble/xscrabble.info new file mode 100644 index 0000000000..a4c3a7d3e8 --- /dev/null +++ b/games/xscrabble/xscrabble.info @@ -0,0 +1,8 @@ +PRGNAM="xscrabble" +VERSION="2.12" +HOMEPAGE="ftp://ftp.ac-grenoble.fr/ge/educational_games/" +DOWNLOAD="ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble-2.12.tar.bz2" +MD5SUM="733e90def2c1d60c0c223f3a0c908db9" +MAINTAINER="Steven A. McIntosh (samac)" +EMAIL="mcintosh@cotterochan.co.uk" +APPROVED="rworkman" diff --git a/games/xscrabble/xscrabble.png b/games/xscrabble/xscrabble.png Binary files differnew file mode 100644 index 0000000000..ee1ef869f8 --- /dev/null +++ b/games/xscrabble/xscrabble.png |