# SliTaz package receipt.

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

BUILD_DEPENDS="nasm"

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

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

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