# $Id: Portfile 63678 2010-02-12 08:55:54Z ryandesign@macports.org $

PortSystem              1.0

name                    starfighter
version                 1.1-1
categories              games
platforms               darwin
maintainers             nomaintainer
license                 GPL-2

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/projects/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             port:libsdl \
                        port:libsdl_mixer \
                        port:libsdl_image

use_configure           no

build.args              PREFIX=${prefix}

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

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