wok annotate othello/receipt @ rev 8947

othello: get tarball from slitaz mirror
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 01 23:18:31 2011 +0100 (2011-03-01)
parents 717afcb65646
children c2e7ccf93d10
rev   line source
pascal@7047 1 # SliTaz package receipt.
pascal@7047 2
pascal@7047 3 PACKAGE="othello"
pascal@7047 4 VERSION="1.0"
pascal@7047 5 CATEGORY="games"
pascal@7047 6 SHORT_DESC="Othello game in javascript"
pascal@8947 7 TARBALL="$PACKAGE-$VERSION.tar.lzma"
pascal@7047 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@7047 9 WEB_SITE="http://www.posi.net/software/othello/"
pascal@7047 10
pascal@7047 11 # Rules to configure and make the package.
pascal@7047 12 compile_rules()
pascal@7047 13 {
pascal@7047 14 mkdir -p $src/images 2> /dev/null
pascal@7047 15 cd $src
pascal@8947 16 if [ ! -s othello.js ] &&
pascal@8947 17 wget http://mirror.slitaz.org/sources/packages/o/$TARBALL; then
pascal@8947 18 unlzma -c $TARBALL | tar xf -
pascal@8947 19 mv $PACKAGE-$VERSION/* .
pascal@8947 20 fi
pascal@7047 21 for i in index.html othello.js \
pascal@7047 22 images/blank.gif images/white.gif images/black.gif \
pascal@7047 23 images/white-trans.gif images/black-trans.gif ; do
pascal@7047 24 [ -s $i ] || wget -P $(dirname $i) $WEB_SITE/$i
pascal@7047 25 done
pascal@7047 26 sed -i 's|TITLE>.*</TITLE|TITLE>Othello</TITLE|' index.html
pascal@7047 27 }
pascal@7047 28
pascal@7047 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7047 30 genpkg_rules()
pascal@7047 31 {
pascal@7047 32 mkdir -p $fs/var/www/othello $fs/usr/share/applications
pascal@7047 33 cp -a $src/* $fs/var/www/othello
pascal@7047 34 chown -R 80.80 $fs/var/www/othello
pascal@7047 35 cat > $fs/usr/share/applications/othello.desktop <<EOT
pascal@7047 36 [Desktop Entry]
pascal@7047 37 Type=Application
pascal@7047 38 Name=Othello
pascal@7125 39 Exec=GtkLauncher file:///var/www/othello/index.html
pascal@7047 40 Icon=/var/www/othello/images/black.gif
pascal@7047 41 Terminal=false
pascal@7047 42 Categories=Game;
pascal@7047 43 Comment=Othello game
pascal@7047 44 EOT
pascal@7047 45 }
pascal@7047 46