SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "othello"

# SliTaz package receipt.

PACKAGE="othello"
VERSION="1.0"
CATEGORY="games"
SHORT_DESC="Othello game in javascript"
TARBALL="$PACKAGE-$VERSION.tar.lzma"
MAINTAINER="pascal.bellard@slitaz.org"
WEB_SITE="http://www.posi.net/software/othello/"

# Rules to configure and make the package.
compile_rules()
{
    mkdir -p $src/images 2> /dev/null
    cd $src
    if [ ! -s othello.js ]; then
        if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
            unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
            mv $PACKAGE-$VERSION/* .
        else
            wget -O $SOURCES_REPOSITORY/$TARBALL http://mirror.slitaz.org/sources/packages/o/$TARBALL &&
            unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
            mv $PACKAGE-$VERSION/* .
        fi
    fi
    #for i in index.html othello.js \
    #    images/blank.gif images/white.gif images/black.gif \
    #    images/white-trans.gif images/black-trans.gif ; do
    #    [ -s $i ] || wget -P $(dirname $i) $WEB_SITE/$i
    #done
    sed -i 's|TITLE>.*</TITLE|TITLE>Othello</TITLE|' index.html
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
        mkdir -p $fs/var/www/othello $fs/usr/share/applications
    cp -a $src/* $fs/var/www/othello
    chown -R 80.80 $fs/var/www/othello
    cat > $fs/usr/share/applications/othello.desktop <<EOT
[Desktop Entry]
Type=Application
Name=Othello
Exec=browser file:///var/www/othello/index.html
Icon=/var/www/othello/images/black.gif
Terminal=false
Categories=Game;
Comment=Othello game
EOT
}

3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)