# -*- 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                mod_dnssd
version             0.6
revision            1
checksums           rmd160  75e3d85960761221be6ff1736d6dbe73da01d24f \
                    sha256  2cd171d76eba398f03c1d5bcc468a1756f4801cd8ed5bd065086e4374997c5aa \
                    size    86417

categories          www
license             Apache-2
maintainers         nomaintainer
description         Apache module to add Zeroconf support via DNS-SD using Avahi
long_description    ${description}

platforms           darwin

homepage            http://0pointer.de/lennart/projects/mod_dnssd/
master_sites        ${homepage}

depends_build       port:pkgconfig
depends_lib         port:apache2 port:avahi

patchfiles          apache24.patch \
                    patch-src_Makefile.in.diff

configure.args      --disable-lynx

set apachectl       ${prefix}/sbin/apachectl
set apxs            ${prefix}/bin/apxs
set httpd_conf      ${prefix}/etc/apache2/httpd.conf
set mdir            ${destroot}${prefix}/lib/apache2/modules/

# Set APXS APACHECTL since configure appears to ignore --with-apxs and
# --with-apachectl
configure.env       APXS=${apxs} \
                    APACHECTL=${apachectl}

pre-destroot {
   xinstall -m 755 -d ${mdir}
}

post-destroot {
   xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
   xinstall -m 644 -W ${worksrcpath} LICENSE README \
      ${destroot}${prefix}/share/doc/${name}
}

notes "
To enable ${name}, add

    LoadModule dnssd_module modules/mod_dnssd.so

to your ${httpd_conf} file.

Please read the documentation at

    ${homepage}

for further details on configuration of this module.
"
