wok-6.x annotate sokojs/receipt @ rev 24875

updated m4 (1.4.18 -> 1.4.19)
author Hans-G?nter Theisgen
date Thu Mar 31 10:07:36 2022 +0100 (2022-03-31)
parents db9d9cb3c164
children
rev   line source
pascal@24117 1 # SliTaz package receipt.
pascal@24117 2
pascal@24117 3 PACKAGE="sokojs"
pascal@24117 4 VERSION="2015"
pascal@24117 5 CATEGORY="games"
pascal@24117 6 SHORT_DESC="Sokoban clone in HTML / CSS / Javascript"
pascal@24117 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@24117 8 LICENSE="GPL2"
pascal@24117 9 TARBALL="$PACKAGE-$VERSION.zip"
pascal@24117 10 WEB_SITE="http://buze.michel.chez.com/Boxworld/src.htm"
pascal@24117 11 WGET_URL="http://buze.michel.chez.com/sokojs.zip"
pascal@24117 12
pascal@24505 13 # What is the latest version available today?
pascal@24505 14 current_version()
pascal@24505 15 {
pascal@24505 16 # https://github.com/framasoft/framagames/tree/master/sokojs
pascal@24505 17 wget -O - https://github.com/michbuze/sokojs/commits/master 2>/dev/null | \
pascal@24505 18 sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y -d
pascal@24505 19 }
pascal@24505 20
pascal@24117 21 # Rules to configure and make the package.
pascal@24117 22 compile_rules()
pascal@24117 23 {
pascal@24117 24 dos2unix *.htm *.txt
pascal@24117 25 sed -i '/sokojs.zip/d;/src.htm/d' level.htm
pascal@24117 26 sed -i 's|Online.* ) ||' sokojs.htm
pascal@24117 27 patch -p0 < $stuff/sokojs.u
pascal@24131 28 patch -p0 < $stuff/undo.u
pascal@24117 29 }
pascal@24117 30
pascal@24117 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@24117 32 genpkg_rules()
pascal@24117 33 {
pascal@24117 34 mkdir -p $fs/var/www $fs/usr/share/applications $install/usr/share/doc
pascal@24128 35 cp -a $src $fs/var/www/sokojs
pascal@24128 36 cp -a $stuff/*.sh $fs/var/www/sokojs
pascal@24117 37 mv $fs/var/www/sokojs/*.txt $install/usr/share/doc
pascal@24117 38 cat > $fs/usr/share/applications/Sokoban.desktop <<EOT
pascal@24117 39 [Desktop Entry]
pascal@24117 40 Type=Application
pascal@24117 41 Name=Sokoban
pascal@24127 42 Comment=Plateform game (get 39000 levels with /var/www/sokojs/levels.sh)
pascal@24117 43 Exec=sh -c "url=http://127.0.0.1/sokojs/main.htm ; tazweb --notoolbar \\\$url || browser \\\$url"
pascal@24117 44 Icon=/var/www/sokojs/4.gif
pascal@24117 45 Terminal=false
pascal@24117 46 Categories=Game
pascal@24117 47 EOT
pascal@24117 48 }