# $Id: Portfile 98640 2012-10-11 22:56:58Z mww@macports.org $

PortSystem 1.0

name                uthash
version             1.9.7
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        sourceforge
checksums           rmd160  7bcc560bb1b8a930eb3ceca7a60b18ce1021b8ae \
                    sha256  956f5c99798349c413275fe4c9ff128d72e280655dadbe4365f8e9fbda91393f
use_bzip2           yes

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 LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name}-(\[0-9\\.\]+)\\${extract.suffix}

