# $Id: Portfile,v 1.3 2004/01/11 23:29:18 mww Exp $

PortSystem 1.0

name		defendguin
version		0.0.10
categories	games
platforms	darwin
maintainers	mww@opendarwin.org
description	clone of the classic arcade game Defender
long_description	Defendguin is based loosely on Williams classic \
			arcade game, Defender. Some recognizable stars in \
			the realm of modern operating systems should be fairly \
			obvious. Story: A certain monopoly-owning bad guy has \
			been cloned hundreds of times by an unknown alien \
			race. They are now attacking earth, kidnapping little \
			penguinoids and converting them into mutants. Helping \
			them on their way are some other nasty alien ships, of \
			which there are plenty...

homepage        http://www.newbreedsoftware.com/defendguin/
master_sites    ftp://ftp.sonic.net/pub/users/nbs/unix/x/defendguin/src/
checksums       md5 83f3ac061be1ed21648c16665ac0984b

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

use_configure	no

build.env	CFLAGS=-I${prefix}/include \
		LDFLAGS=-L${prefix}/lib 

build.args	PREFIX=${prefix} \
		JOY=NO

destroot.args	PREFIX=${destroot}${prefix} \
		MAN_PREFIX=${destroot}${prefix}/share

pre-destroot	{
	file mkdir ${destroot}${prefix}/share/doc/${name}
	file copy ${worksrcpath}/CHANGES.txt ${worksrcpath}/COPYING.txt \
		${worksrcpath}/README.txt ${worksrcpath}/AUTHORS.txt \
		${worksrcpath}/INSTALL.txt ${worksrcpath}/TODO.txt \
		${destroot}${prefix}/share/doc/${name}
}

variant darwin	{
	post-destroot	{
		file mkdir ${destroot}/Applications/DarwinPorts/Defendguin.app/Contents/MacOS
		system "ln -s ${prefix}/bin/defendguin \
			${destroot}/Applications/DarwinPorts/Defendguin.app/Contents/MacOS/Defendguin"
	}
}
