# -*- 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.
supported_archs     noarch
platforms           {darwin any}
homepage            https://github.com/knoxell/certbot-dns-namecheap

variant python39 conflicts python310 python311 python312 python313 description {Use Python 3.9} {}
variant python310 conflicts python39 python311 python312 python313 description {Use Python 3.10} {}
variant python311 conflicts python39 python310 python312 python313 description {Use Python 3.11} {}
variant python312 conflicts python39 python310 python311 python313 description {Use Python 3.12} {}
variant python313 conflicts python39 python310 python311 python312 description {Use Python 3.13} {}

if {![variant_isset python39] && ![variant_isset python310] && \
        ![variant_isset python311] && ![variant_isset python312]} {
    default_variants +python313
}

foreach pv {313 312 311 310 39} {
    if {[variant_isset python${pv}]} {
        python.default_version ${pv}
        break
    }
}

checksums           rmd160  4d6b79c6be22b18078021c65b1229bfc6d8aef3b \
                    sha256  0801da6093f517720e86efbc7f42515a14ec135fe7e5bce118e8d0b6e6fb51e5 \
                    size    9386

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${python.version}