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

name                certbot-dns-namecheap
version             1.0.0
revision            1
categories          security
license             Apache-2
maintainers         {mps @Schamschula} openmaintainer
description         The certbot namecheap.com plugin for dns-01 challenges
long_description    The namecheap.com plugin automates the process of completing a \
                    dns-01 challenge (DNS01) by creating, and subsequently removing, \
                    TXT records using the (XML-RPC-based) namecheap.com API.
platforms           darwin

variant python37 conflicts python38 python39 python310 python311 description {Use Python 3.7} {}
variant python38 conflicts python37 python39 python310 python311 description {Use Python 3.8} {}
variant python39 conflicts python37 python38 python310 python311 description {Use Python 3.9} {}
variant python310 conflicts python37 python38 python39 python311 description {Use Python 3.10} {}
variant python311 conflicts python37 python38 python39 python310 description {Use Python 3.11} {}

if { ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310]} {
    default_variants +python311
}

foreach pv {311 310 39 38 37} {
    if {[variant_isset python${pv}]} {
        python.default_version  ${pv}
        set python_variant      python${pv}
        break
    }
}

checksums           rmd160  4d6b79c6be22b18078021c65b1229bfc6d8aef3b \
                    sha256  0801da6093f517720e86efbc7f42515a14ec135fe7e5bce118e8d0b6e6fb51e5 \
                    size    9386

depends_build-append \
                    port:py${python.version}-setuptools

depends_lib-append  port:certbot \
                    port:py${python.version}-acme \
                    port:py${python.version}-dns-lexicon \
                    port:py${python.version}-mock \
                    port:py${python.version}-ndg_httpsclient \
                    port:py${python.version}-pynamecheap \
                    port:py${python.version}-pyotp \
                    port:py${python.version}-python-augeas \
                    port:py${python.version}-zope-component \
                    port:py${python.version}-zopeinterface

require_active_variants certbot   ${python_variant}
