wok-4.x annotate checkers/receipt @ rev 9314

Add ofono.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Mar 17 20:15:21 2011 +0000 (2011-03-17)
parents 717afcb65646
children 2b260f668fef
rev   line source
pascal@7046 1 # SliTaz package receipt.
pascal@7046 2
pascal@7046 3 PACKAGE="checkers"
pascal@7046 4 VERSION="1.0"
pascal@7046 5 CATEGORY="games"
pascal@7046 6 SHORT_DESC="Checkers game in javascript"
pascal@7046 7 MAINTAINER="pascal.bellard@slitaz.org"
slaxemulator@9144 8 TARBALL="$PACKAGE-$VERSION.tar.lzma"
pascal@7046 9 WEB_SITE="http://thierry.franquin.free.fr/jeudame/Dames.htm"
pascal@7046 10
pascal@7046 11 # Rules to configure and make the package.
pascal@7046 12 compile_rules()
pascal@7046 13 {
slaxemulator@9144 14
slaxemulator@9144 15 if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
slaxemulator@9144 16 unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
slaxemulator@9144 17 else
slaxemulator@9144 18 mkdir -p $src/$PACKAGE-$VERSION
slaxemulator@9144 19 for i in Dames.htm black.gif gray.gif \
slaxemulator@9144 20 me1k.gif me2k.gif you1k.gif you2k.gif \
slaxemulator@9144 21 me1.gif me2.gif you1.gif you2.gif ; do
slaxemulator@9144 22 [ -s $i ] || wget -O $src/$PACKAGE-$VERSION/$i $(dirname $WEB_SITE)/$i
slaxemulator@9144 23 done
slaxemulator@9144 24 cd $src
slaxemulator@9144 25 tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si
slaxemulator@9144 26 mv $PACKAGE-$VERSION/* .
slaxemulator@9144 27 rm -rf $PACKAGE-$VERSION
slaxemulator@9144 28 fi
slaxemulator@9144 29
pascal@7046 30 cd $src
pascal@7046 31 grep -qs Dames_htm_smartbutton1 Dames.htm || return 0
pascal@7046 32 sed -i -e 's|TITLE>.*</TITLE|TITLE>Checkers</TITLE|' \
pascal@7046 33 -e 's|background="nth_brown_bg.gif" ||' \
pascal@7046 34 -e 's|cellpadding=0|& align=center|' \
pascal@7046 35 -e '/Vous devez commencer/d' \
pascal@7046 36 -e '/version = 1.0;/,/Checkers Game/d' \
pascal@7046 37 -e '/wrap=virtual/d' \
pascal@7046 38 -e '/marrer le jeu/d' \
pascal@7046 39 -e '/Dames_htm_smartbutton1/d' \
pascal@7046 40 -e 's|table><br>"|&);|' \
pascal@7046 41 Dames.htm
pascal@7046 42 }
pascal@7046 43
pascal@7046 44 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7046 45 genpkg_rules()
pascal@7046 46 {
pascal@7046 47 mkdir -p $fs/var/www/checkers $fs/usr/share/applications
pascal@7046 48 cp $src/* $fs/var/www/checkers
pascal@7046 49 mv $fs/var/www/checkers/Dames.htm $fs/var/www/checkers/index.html
pascal@7046 50 chown -R 80.80 $fs/var/www/checkers
pascal@7046 51 cat > $fs/usr/share/applications/checkers.desktop <<EOT
pascal@7046 52 [Desktop Entry]
pascal@7046 53 Type=Application
pascal@7046 54 Name=Checkers
pascal@7125 55 Exec=GtkLauncher file:///var/www/checkers/index.html
pascal@7046 56 Icon=/var/www/checkers/you1.gif
pascal@7046 57 Terminal=false
pascal@7046 58 Categories=Game;
pascal@7046 59 Comment=Checkers game
pascal@7046 60 EOT
pascal@7046 61 }
pascal@7046 62