# SliTaz package receipt.

PACKED_SIZE="16.0K"
UNPACKED_SIZE="24.0K"
PACKAGE="bootsnake"
VERSION="slitaz"
CATEGORY="games"
SHORT_DESC="Bootable snake game in a 512-byte boot sector."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="unknown"
#TARBALL="snake.asm"
WEB_SITE="https://github.com/mfurga/snake-512"
#WGET_URL="https://github.com/mfurga/snake-512/raw/bfda2ae7b8127234ddf7d3cccfce03b4f487f134/snake.asm"
TARGET="i486"

BUILD_DEPENDS="nasm"

# Rules to configure and make the package.
compile_rules()
{
	mkdir -p $src
	nasm -f bin $stuff/snake.asm -o $src/snake.img -l $src/snake.lst
} 

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/boot
	cp $src/snake.img $fs/boot/snake
}

# Post install/remove commands for Tazpkg.
post_install()
{
	grep -qs ^bootsnake $1/boot/bootmenu ||
	echo "snake	Snake,snake		Snake (may run under DOS if renamed to snake.com)" >> $1/boot/bootmenu
}