From 5140f6ebaa18539cffc299f138b98fd7f67268aa Mon Sep 17 00:00:00 2001 From: Gwenhael Le moine Date: Sat, 14 Nov 2009 14:40:07 +0700 Subject: [PATCH] add y/xscrabble Signed-off-by: Gwenhael Le moine --- y/xscrabble/get_ODS5.sh | 26 ++++++ y/xscrabble/xscrabble.SlackBuild | 153 +++++++++++++++++++++++++++++++ y/xscrabble/xscrabble.png | Bin 0 -> 3443 bytes 3 files changed, 179 insertions(+) create mode 100755 y/xscrabble/get_ODS5.sh create mode 100755 y/xscrabble/xscrabble.SlackBuild create mode 100644 y/xscrabble/xscrabble.png diff --git a/y/xscrabble/get_ODS5.sh b/y/xscrabble/get_ODS5.sh new file mode 100755 index 00000000..876a5084 --- /dev/null +++ b/y/xscrabble/get_ODS5.sh @@ -0,0 +1,26 @@ +#!/bin/sh +######################################################################## +# This file is part of get_ODS5.sh. # +# get_ODS5.sh is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published # +# by the Free Software Foundation; either version 3 of the License, or # +# (at your option) any later version. # +# get_ODS5.sh is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License # +# along with get_ODS5.sh; if not, write to the Free Software # +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # +# USA # +# Written and (c) by # +# Contact for comment & bug reports # +######################################################################## + +rm ODS5 ODS5.gz +wget -c http://www.madfix.com/ods/ods5.txt +for i in $(seq 2 15) ; do + echo "extraction des mots de $i lettres" + grep "^$(for j in $(seq 1 $i) ; do echo -n "." ; done)$" ods5.txt | sort >> ODS5 +done +gzip ODS5 diff --git a/y/xscrabble/xscrabble.SlackBuild b/y/xscrabble/xscrabble.SlackBuild new file mode 100755 index 00000000..7d0efdae --- /dev/null +++ b/y/xscrabble/xscrabble.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/sh + +# Slackware build script for Xscrabble +# Written by Steven A. McIntosh (samac) (mcintosh@cotterochan.co.uk) +# Modified by Robby Workman +# Modified by Gwenhael Le Moine + +PRGNAM=xscrabble +VERSION=2.12 +ARCH=${ARCH:-$(uname -m)} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +DEFAULT_LANG=${DEFAULT_LANG:-fr} + +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 . + rm ODS4.gz && cp $CWD/ODS5.gz . + ) + 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 + sed -i 's|ODS4|ODS5|g' $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 < $PKG/usr/share/applications/$PRGNAM.desktop +[Desktop Entry] +Name=xscrabble +Comment=A Scrabble-like game +Exec=xscrabble +TryExec=xscrabble +Icon=xscrabble +Terminal=false +Type=Application +Categories=Game; +EOF +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +# 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: http://files.codes-sources.com/fichier.aspx?id=32452&f=ods5.txt +EOF + +cat < $PKG/install/doinst.sh +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 +EOF + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/y/xscrabble/xscrabble.png b/y/xscrabble/xscrabble.png new file mode 100644 index 0000000000000000000000000000000000000000..ee1ef869f8ec58f8e975c6c3744b2363a4cadbaf GIT binary patch literal 3443 zcmV-(4UF=MP)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RU0s;>e0{hFnsQ>^C1xZ9fR9M4x zSZj|Z*Hzv7JgZJs-Ku-LZ@+tH+%t|nHiHa~W1Pg`hk^xC5=DXtBp?LEU-%7(ApU@V z0ud4dDTqkOAQ2$gfFi&K+t@SXo@c*r-}k+B>s@uu;X_Z_V>8|#wsuKXXPy11qqPoN zI|l#&0)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