PortSystem          1.0

name                ocaml-ocamlmakefile
version             6.37.0
revision            2
categories          ocaml devel
maintainers         nomaintainer
license             LGPL-2.1
platforms           darwin
supported_archs     noarch
description         Automated compilation of complex OCaml-projects
long_description    ${description}

homepage            https://bitbucket.org/mmottl/ocaml-makefile
master_sites        https://bitbucket.org/mmottl/ocaml-makefile/downloads/

distname            ocaml-makefile-${version}

checksums           rmd160  30ed58878aeec483c060ba161185f4655914ddc1 \
                    sha256  99ff58080ed154cc4bd70f915fe4760dffb026a1c0447caa0b3bdb982b24b0a8

depends_run         port:ocaml \
                    port:ocaml-findlib

use_configure       no

build               {}

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/ \
        ${destroot}${prefix}/share/doc/${name} \
        ${destroot}${prefix}/share/examples/${name}
    xinstall -m 644 -W ${worksrcpath} OCamlMakefile \
        ${destroot}${prefix}/share/${name}
    foreach d {calc camlp4 gtk idl threads} {
        file copy ${worksrcpath}/${d} ${destroot}${prefix}/share/examples/${name}
    }
    xinstall -m 644 -W ${worksrcpath} CHANGES.txt COPYING.txt GPL.txt LGPL.txt \
        README.md ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "ocaml-makefile-(\[0-9\.]+).tar.gz"