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

github.setup        nexB python-publicsuffix2 2.2019-12-21 release-
github.tarball_from archive
name                py-publicsuffix2
version             [string map {{-} {}} ${github.version}]

categories-append   net
platforms           darwin
license             {MIT MPL-2}
maintainers         nomaintainer

description         Get a public suffix for a domain name using the Public Suffix List
long_description    {*}${description}

homepage            https://github.com/nexB/python-publicsuffix2

checksums           rmd160  54344704c8e8315db56e1296d6b8244af5d4e0d8 \
                    sha256  b4ef022fccd7b4968151af208b0f890e55c00b24892a1a826b2b7a381215bafa \
                    size    98142

python.versions     27 36 37 38 39

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

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} CHANGELOG.rst publicsuffix2.LICENSE \
            README.rst ${destroot}${prefix}/share/doc/${subport}
    }

    test.run        yes

    livecheck.type  none
} else {
    livecheck.type  pypi
}
