# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                libhttpd
version             2.0
revision            0

categories          devel www
license             GPL-3+
maintainers         nomaintainer
description         provides basic web server capabilities
long_description    libhttpd can be used to add basic web server \
                    capabilities to an application or embedded device. \
                    The library handles both static and dynamically generated \
                    content, has very low overheads, and provides many \
                    features to simplify the creation of web based \
                    application interfaces.

homepage            https://hughestech.com.au/
master_sites        ${homepage}downloads/${name}/
distname            ${name}-${version}
checksums           rmd160  2b841b9f5d23edd96704a0787f4a704bf12061c4 \
                    sha256  a4a9c6c6db30c521e3082950b049ed2f09035f90678ed7052bf856688114f04e \
                    size    68217

post-patch {
    reinplace "s|/opt/nk|${destroot}${prefix}|g" \
    ${worksrcpath}/src/Makefile.tmpl
}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} HISTORY LICENSE \
        README ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath}/doc FAQ.txt ${destroot}${docdir}
}
