# $Id: Portfile 53088 2009-06-29 05:16:32Z ryandesign@macports.org $

PortSystem          1.0

name                fbuild
version             0.1
categories          devel python
maintainers         erickt
description         Software build system
long_description    Fbuild is a cross platform multilanguage build system that \
                    uses a caching build system instead of tree evaluation like \
                    Make.
platforms           darwin
homepage            http://www.felix-lang.org/
master_sites        sourceforge:felix

checksums           md5     e335c52eaeec1c735413e8a3cf95a93c \
                    sha1    c1be73703aa64369962c9edc057fa65eb7f9c5df \
                    rmd160  151f89291cc393d5ce89f7bea08bea5da95de0b1

depends_lib         port:python31

use_configure       no

build.cmd           ${prefix}/bin/python3.1 setup.py
build.target        build

destroot.cmd        ${prefix}/bin/python3.1 setup.py
destroot.destdir    --root=${destroot} --install-scripts=${prefix}/bin

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}

    xinstall -m 644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}

    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}/docs

    xinstall -d ${destroot}${prefix}/share/doc/${name}/examples
    foreach f [glob -dir ${worksrcpath}/examples -tails *] {
        file copy ${worksrcpath}/examples/$f ${destroot}${prefix}/share/doc/${name}/examples/$f
    }
}
