# SliTaz package receipt.
PACKAGE="checkers"
VERSION="1.0"
CATEGORY="games"
SHORT_DESC="Checkers game in javascript"
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.lzma"
WEB_SITE="http://thierry.franquin.free.fr/jeudame/Dames.htm"
# Rules to configure and make the package.
compile_rules()
{
if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
else
mkdir -p $src/$PACKAGE-$VERSION
for i in Dames.htm black.gif gray.gif \
me1k.gif me2k.gif you1k.gif you2k.gif \
me1.gif me2.gif you1.gif you2.gif ; do
[ -s $i ] || wget -O $src/$PACKAGE-$VERSION/$i $(dirname $WEB_SITE)/$i
done
cd $src
tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si
mv $PACKAGE-$VERSION/* .
rm -rf $PACKAGE-$VERSION
fi
cd $src
grep -qs Dames_htm_smartbutton1 Dames.htm || return 0
sed -i -e 's|TITLE>.*Checkers
"|&);|' \
Dames.htm
}
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
mkdir -p $fs/var/www/checkers $fs/usr/share/applications
cp $src/* $fs/var/www/checkers
mv $fs/var/www/checkers/Dames.htm $fs/var/www/checkers/index.html
chown -R 80.80 $fs/var/www/checkers
cat > $fs/usr/share/applications/checkers.desktop <