# $Id$

PortSystem 1.0

name                uthash
version             1.9.9
categories          devel
platforms           darwin
maintainers         mww
license             BSD
description         easy-to-use hash implementation for C programmers.
long_description    ${description}

homepage            http://uthash.sourceforge.net/
master_sites        https://github.com/troydhanson/uthash/archive/
distname            v${version}
checksums           rmd160  031d5e7655238992595d9996c6c97d8796e79283 \
                    sha256  f2f10115f4de03b98d8c2e860e241d165aa15019bd634ee0e3debe58341bbf0c

worksrcdir          ${name}-${version}

use_configure       no

supported_archs     noarch

build               {}

destroot {
    xinstall -d ${destroot}${prefix}/include/uthash/
    xinstall -m 0444 -W ${worksrcpath}/src uthash.h utlist.h utarray.h utstring.h \
        ${destroot}${prefix}/include/uthash/
    xinstall -d ${destroot}${prefix}/share/doc/
    copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
    delete ${destroot}${prefix}/share/doc/${name}/Makefile
    xinstall -m 644 -W ${worksrcpath} README.md LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       https://github.com/troydhanson/uthash/releases
livecheck.regex     v(\[0-9.\]+).tar.gz