wok-next annotate chess3d/receipt @ rev 20766

childsplay: up (3.3); tiny edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jun 06 04:36:32 2018 +0300 (2018-06-06)
parents fe59386a94f9
children d5aab818505e
rev   line source
al@20766 1 # SliTaz package receipt v2.
pascal@7054 2
pascal@7054 3 PACKAGE="chess3d"
pascal@7054 4 VERSION="1.0"
pascal@7054 5 CATEGORY="games"
pascal@7054 6 SHORT_DESC="3D Chess game in javascript"
pascal@7054 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15606 8 LICENSE="GPL"
pascal@7054 9 WEB_SITE="http://chessforeva.appspot.com/"
pascal@7054 10
al@20766 11 compile_rules() {
al@20766 12 mkdir -p $src
pascal@7054 13 cd $src
al@20766 14
al@20766 15 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@20766 16 if [ -f $SRC/$TARBALL ]; then
al@20766 17 tar -xf $SRC/$TARBALL
al@20766 18 else
al@20766 19 mkdir -p arts d_img img
al@20766 20
al@20766 21 for i in C0_Toledo.htm c0_pgn.js c0_chess.js; do
al@20766 22 wget $WEB_SITE$i || return 1
al@20766 23 dos2unix $i
pascal@7054 24 done
al@20766 25
al@20766 26 wget -P arts ${WEB_SITE}arts/a_arrow.gif || return 1
al@20766 27
al@20766 28 for i in b_plus1 b_minus1 b_topview oie_arrow_white; do
al@20766 29 wget -P img ${WEB_SITE}img/$i.gif || return 1
al@20766 30 done
al@20766 31
al@20766 32 for i in t oie; do
al@20766 33 for j in board letters letters2; do
al@20766 34 wget -P img ${WEB_SITE}img/${i}_$j.gif || return 1
al@20766 35 done
al@20766 36 for j in w b; do
al@20766 37 for k in pawn rook knight1 knight2 bishop qeen king; do
al@20766 38 wget -P img ${WEB_SITE}img/${i}_${j}$k.gif || return 1
al@20766 39 done
pascal@7054 40 done
pascal@7054 41 done
al@20766 42 tar -czf $SRC/$TARBALL *
al@20766 43 fi
al@20766 44
al@20766 45 sed \
al@20766 46 -e 's/var THide=.*/var THide=1;/' \
pascal@7054 47 -e 's/var Tnoback=.*/var Tnoback=1;/' \
pascal@7570 48 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
pascal@7054 49 -e 's|http://chess.*com/||' \
pascal@7571 50 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
al@20766 51 -e "s|$WEB_SITE||" \
al@20766 52 -i C0_Toledo.htm
al@20766 53 sed -i -e "s|$WEB_SITE||" *.js
al@20766 54
al@20766 55 mkdir -p $install/var/www/chess3d/
al@20766 56 cp -r $src/* $install/var/www/chess3d/
al@20766 57 mv $install/var/www/chess3d/C0_Toledo.htm $install/var/www/chess3d/index.html
pascal@7054 58 }
pascal@7054 59
al@20766 60 genpkg_rules() {
al@20766 61 copy @std
pascal@7054 62 chown -R 80.80 $fs/var/www/chess3d
al@20766 63 TAGS="chess"
pascal@7054 64 }