wok-6.x annotate hatenarunner/receipt @ rev 9922

thunar: fix deps/bdeps
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue May 17 23:13:52 2011 +0200 (2011-05-17)
parents b50e6276ecc8
children bba1751b3cc0
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/"
pascal@7049 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"
pascal@8989 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 mkdir $src
pascal@7049 17 cd $src
pascal@7049 18 if [ ! -s $SOURCES_REPOSITORY/$TARBALL ]; then
pascal@7049 19 wget $_WGET_URL -O $TARBALL
pascal@7049 20 mv $TARBALL $SOURCES_REPOSITORY
pascal@7049 21 fi
pascal@7049 22 unzip $SOURCES_REPOSITORY/$TARBALL
pascal@7049 23 unzip HatenaRunner_MainGameScript.zip
pascal@7049 24 rm -f HatenaRunner_MainGameScript.zip
pascal@7049 25 dos2unix js/* *.htm *.css
pascal@7049 26 # Add u, i, o, j, k, and l keys
pascal@7049 27 sed -i -e 's/104:$/& case 73: case 105:/' \
pascal@7049 28 -e 's/98:$/& case 75: case 107:/' \
pascal@7049 29 -e 's/100:$/& case 74: case 106:/' \
pascal@7049 30 -e 's/102:$/& case 76: case 108:/' \
pascal@7049 31 -e 's/88:/& case 79: case 111:/' \
pascal@7049 32 -e 's/90:/& case 85: case 117:/' \
pascal@7049 33 js/key.js
pascal@7049 34 sed -i -e 's/<title>.*</<title>Lode Runner</' \
pascal@7049 35 -e 's/preStart()"/preStart(); javascript:init();"/' \
pascal@7049 36 -e '/a href=/d' -e '/li>/d' -e '/ul>/d' -e '/Explorer/d' \
pascal@7049 37 runner.htm
pascal@7049 38 rm -rf images/start.png images/hrlogo.png ScreenS Docs Unknown \
pascal@7049 39 users favicon.ico icon.png
pascal@7049 40 mv runner.htm index.html
pascal@7049 41 }
pascal@7049 42
pascal@7049 43 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7049 44 genpkg_rules()
pascal@7049 45 {
pascal@7049 46 mkdir -p $fs/var/www/lode $fs/usr/share/applications
pascal@7049 47 cp -a $src/* $fs/var/www/lode
pascal@7049 48 chown -R 80.80 $fs/var/www/lode
pascal@7049 49 cat > $fs/usr/share/applications/lode.desktop <<EOT
pascal@7049 50 [Desktop Entry]
pascal@7049 51 Type=Application
pascal@7049 52 Name=Lode runner
slaxemulator@9600 53 Exec=browser file:///var/www/lode/index.html
pascal@7049 54 Icon=/var/www/lode/images/o0.gif
pascal@7049 55 Terminal=false
pascal@7049 56 Categories=Game;
pascal@7049 57 Comment=Lode runner clone
pascal@7049 58 EOT
pascal@7049 59 }
pascal@7049 60