# $Id: Portfile 58210 2009-09-24 06:56:08Z ryandesign@macports.org $

PortSystem              1.0

name                    defendguin
version                 0.0.11
categories              games
platforms               darwin
maintainers             nomaintainer

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.billsgames.com/unix/x/defendguin/src/

checksums               md5     c8040e39f199c5338625066025ec2395 \
                        sha1    e7d9e31aebe5d43d854170fcbbf82eaf8daa4ea4 \
                        rmd160  383c40d5091aad917b290506cd1e1527531e106c

depends_lib             path:lib/pkgconfig/sdl.pc:libsdl \
                        port: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

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}-${version}
    xinstall -d ${docdir}
    xinstall -W ${worksrcpath}/docs \
        AUTHORS.txt \
        CHANGES.txt \
        COPYING.txt \
        INSTALL.txt \
        README.txt \
        TODO.txt \
        ${docdir}
}

platform darwin {
    post-destroot {
        xinstall -d ${destroot}${applications_dir}/Defendguin.app/Contents/MacOS
        ln -s ${prefix}/bin/defendguin \
            ${destroot}${applications_dir}/Defendguin.app/Contents/MacOS/Defendguin
    }
}
