# HG changeset patch # User Pascal Bellard # Date 1288608107 -3600 # Node ID 7973fdac3a543e79f47fff9a8d09fe72c4627476 # Parent 7485f69c1c89c1fed2f966b664f5bcb400e7edcf Add hatenarunner diff -r 7485f69c1c89 -r 7973fdac3a54 hatenarunner/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hatenarunner/receipt Mon Nov 01 11:41:47 2010 +0100 @@ -0,0 +1,59 @@ +# SliTaz package receipt. + +PACKAGE="hatenarunner" +VERSION="1.0" +CATEGORY="games" +SHORT_DESC="Loderunner game in javascript" +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://lodedome.no-ip.com/" +TARBALL="JavaScript_Hatena.Runner_Satoshi.Ueyama.zip" +_WGET_URL="http://lodedome.no-ip.com/download.php?rfname=$TARBALL&request_id=Lode_5BBAB6F85D944A4A5CB7AC12B0BFD18D" + +# Rules to configure and make the package. +compile_rules() +{ + mkdir $src + cd $src + if [ ! -s $SOURCES_REPOSITORY/$TARBALL ]; then + wget $_WGET_URL -O $TARBALL + mv $TARBALL $SOURCES_REPOSITORY + fi + unzip $SOURCES_REPOSITORY/$TARBALL + unzip HatenaRunner_MainGameScript.zip + rm -f HatenaRunner_MainGameScript.zip + dos2unix js/* *.htm *.css + # Add u, i, o, j, k, and l keys + sed -i -e 's/104:$/& case 73: case 105:/' \ + -e 's/98:$/& case 75: case 107:/' \ + -e 's/100:$/& case 74: case 106:/' \ + -e 's/102:$/& case 76: case 108:/' \ + -e 's/88:/& case 79: case 111:/' \ + -e 's/90:/& case 85: case 117:/' \ + js/key.js + sed -i -e 's/.*</<title>Lode Runner</' \ + -e 's/preStart()"/preStart(); javascript:init();"/' \ + -e '/a href=/d' -e '/li>/d' -e '/ul>/d' -e '/Explorer/d' \ + runner.htm + rm -rf images/start.png images/hrlogo.png ScreenS Docs Unknown \ + users favicon.ico icon.png + mv runner.htm index.html +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/var/www/lode $fs/usr/share/applications + cp -a $src/* $fs/var/www/lode + chown -R 80.80 $fs/var/www/lode + cat > $fs/usr/share/applications/lode.desktop <<EOT +[Desktop Entry] +Type=Application +Name=Lode runner +Exec=browser file:///var/www/lode/index.html +Icon=/var/www/lode/images/o0.gif +Terminal=false +Categories=Game; +Comment=Lode runner clone +EOT +} +