# $Id: Portfile 31341 2007-11-20 15:45:13Z saispo@macports.org $

PortSystem 1.0

name		starfighter
version		1.1-1
categories	games
platforms	darwin
maintainers	nomaintainer
description	2D Space Shooter
long_description	2D Space Shooter\; after decades of war one company, \
			who had gained powerful supply both sides with \
			weaponary, steps forwards and crushes both warring \
			factions in one swift movement. Using far superior \
			weaponary and AI craft, the company was completely \
			unstoppable and now no one can stand in their way. \
			Thousands began to perish under the iron fist of the \
			company. The people cried out for a saviour, for \
			someone to light this dark hour... and someone did.

homepage	http://www.parallelrealities.co.uk/starfighter.php
master_sites	http://www.sourcefiles.org/Games/Arcade/
checksums	md5 6a4b704dbc83c7403842b936f95ee958
patchfiles	patch-makefile.diff

post-extract	{
	file rename ${workpath}/starfighter-1.1 ${worksrcpath}
}

depends_lib	bin:sdl-config:libsdl \
		lib:libSDL_mixer:libsdl_mixer \
		lib:libSDL_image:libsdl_image

use_configure	no

build.args	PREFIX=${prefix}

destroot.destdir	PREFIX=${destroot}${prefix}

post-destroot	{
	xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} \
		${destroot}/Applications/MacPorts/Starfighter.app/Contents/MacOS
	xinstall -m 644 ${worksrcpath}/docs/LICENSE \
		${destroot}${prefix}/share/doc/${name}
	system "ln -s ${prefix}/bin/starfighter ${destroot}/Applications/MacPorts/Starfighter.app/Contents/MacOS/Starfighter"
}
