# -*- 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
PortGroup          python 1.0

name               py-dnspython
version            1.15.0
categories-append  net
license            ISC
platforms          darwin
supported_archs    noarch
maintainers        {ram @skymoo} openmaintainer

description        DNS toolkit for Python
long_description \
  dnspython is a DNS toolkit for Python. It supports almost all \
  record types. It can be used for queries, zone transfers, and \
  dynamic updates. It supports TSIG authenticated messages and EDNS0.

homepage           http://www.dnspython.org/
master_sites       ${homepage}kits/${version}
distname           dnspython-${version}

python.versions    26 27 33 34 35 36

checksums          rmd160 b3bf88a627850d29b5da6e67d5f2e9643283bc65 \
                   sha256 11598ae5735746e63921f8eebdfdee4a2e7d0ba842ebd57ba02682d4aed8244b

if {${name} ne ${subport}} {
  depends_build-append port:py${python.version}-setuptools
}

post-destroot {
  if {${name} ne ${subport}} {
  xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}/examples
  xinstall -m 644 -W ${worksrcpath} ChangeLog LICENSE \
    ${destroot}${prefix}/share/doc/${subport}
  xinstall -m 644 -W ${worksrcpath}/examples ddns.py e164.py \
    mx.py name.py reverse.py reverse_name.py xfr.py \
    ${destroot}${prefix}/share/doc/${subport}/examples
  }
}

if {${name} eq ${subport}} {
  livecheck.type   regex
  livecheck.url    ${homepage}
  livecheck.regex  {is (\d+(?:\.\d+)*),}
} else {
  livecheck.type   none
}