# $Id: Portfile 53793 2009-07-14 05:05:41Z ryandesign@macports.org $

PortSystem          1.0
name                caml-bin-prot
version             1.2.10
categories          devel ml
maintainers         erickt openmaintainer
description         A binary protocol generator
homepage            http://ocaml.janestreet.com/?q=node/13
platforms           darwin
master_sites        http://www.janestreet.com/ocaml

distfiles           bin-prot-release-${version}.tar.gz
worksrcdir          bin-prot-release-${version}

checksums           md5     ad3fc9fe56e1c7c6252cd5773947ea04 \
                    sha1    8cb2d87754d6e41a3c2221657f238fb7c726974a \
                    rmd160  57b04b87dae398a1ce61f7736e3a92b7516cfc60

depends_lib         port:ocaml port:caml-findlib port:caml-ounit

use_configure       no

build.env           PREFIX=${prefix}

set ocamlfind_destdir ${destroot}${prefix}/lib/ocaml/site-lib

destroot.env        OCAMLFIND_INSTFLAGS="-ldconf ignore -destdir $ocamlfind_destdir"

pre-destroot {
    file mkdir $ocamlfind_destdir
}

livecheck.check     regex
livecheck.regex     "bin-prot-release-(.*?).tar.gz"
