wok-next annotate hatenarunner/receipt @ rev 11905

Up: slitaz-tools (4.6) - New wifibox, installer and small fixes
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 29 20:36:46 2012 +0100 (2012-02-29)
parents 84d10fcd74e8
children de49f29b101e
rev   line source
pascal@7049 1 # SliTaz package receipt.
pascal@7049 2
pascal@7049 3 PACKAGE="hatenarunner"
pascal@7049 4 VERSION="1.0"
pascal@7049 5 CATEGORY="games"
pascal@7049 6 SHORT_DESC="Loderunner game in javascript"
pascal@7049 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@7049 8 WEB_SITE="http://lodedome.no-ip.com/"
slaxemulator@10770 9 TARBALL="JavaScript_Hatena.Runner_Satoshi.Ueyama.zip"
pascal@8989 10 #_WGET_URL="http://lodedome.no-ip.com/download.php?rfname=$TARBALL&request_id=Lode_5BBAB6F85D944A4A5CB7AC12B0BFD18D"
slaxemulator@10770 11 WGET_URL="http://mirror.slitaz.org/sources/packages/${TARBALL:0:1}/$TARBALL"
pascal@7049 12
pascal@7049 13 # Rules to configure and make the package.
pascal@7049 14 compile_rules()
pascal@7049 15 {
pascal@7049 16 cd $src
pascal@10701 17 unzip -o HatenaRunner_MainGameScript.zip
pascal@7049 18 rm -f HatenaRunner_MainGameScript.zip
pascal@7049 19 dos2unix js/* *.htm *.css
pascal@7049 20 # Add u, i, o, j, k, and l keys
pascal@7049 21 sed -i -e 's/104:$/& case 73: case 105:/' \
pascal@7049 22 -e 's/98:$/& case 75: case 107:/' \
pascal@7049 23 -e 's/100:$/& case 74: case 106:/' \
pascal@7049 24 -e 's/102:$/& case 76: case 108:/' \
pascal@7049 25 -e 's/88:/& case 79: case 111:/' \
pascal@7049 26 -e 's/90:/& case 85: case 117:/' \
pascal@7049 27 js/key.js
pascal@7049 28 sed -i -e 's/<title>.*</<title>Lode Runner</' \
pascal@7049 29 -e 's/preStart()"/preStart(); javascript:init();"/' \
pascal@7049 30 -e '/a href=/d' -e '/li>/d' -e '/ul>/d' -e '/Explorer/d' \
pascal@7049 31 runner.htm
pascal@7049 32 rm -rf images/start.png images/hrlogo.png ScreenS Docs Unknown \
pascal@7049 33 users favicon.ico icon.png
pascal@7049 34 mv runner.htm index.html
pascal@7049 35 }
pascal@7049 36
pascal@7049 37 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7049 38 genpkg_rules()
pascal@7049 39 {
pascal@7049 40 mkdir -p $fs/var/www/lode $fs/usr/share/applications
pascal@7049 41 cp -a $src/* $fs/var/www/lode
pascal@7049 42 chown -R 80.80 $fs/var/www/lode
pascal@7049 43 cat > $fs/usr/share/applications/lode.desktop <<EOT
pascal@7049 44 [Desktop Entry]
pascal@7049 45 Type=Application
pascal@7049 46 Name=Lode runner
slaxemulator@9600 47 Exec=browser file:///var/www/lode/index.html
pascal@7049 48 Icon=/var/www/lode/images/o0.gif
pascal@7049 49 Terminal=false
pascal@7049 50 Categories=Game;
pascal@7049 51 Comment=Lode runner clone
pascal@7049 52 EOT
pascal@7049 53 }
pascal@7049 54