# -*- 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-kcs11
python.rootname     PyKCS11
version             1.5.18
revision            0

license             GPL-2+
maintainers         nomaintainer

description         PKCS11 wrapper for Python
long_description    PyKCS11 let you access to almost all PKCS#11 functions and data types \
                    using any PKCS#11 library, such as the various modules supplied by \
                    smartcard vendors.
homepage            https://github.com/LudovicRousseau/PyKCS11
distname            pykcs11-${version}
checksums           rmd160  cc54cb3ba63fb793c861059bd9a696cd61382053 \
                    sha256  12fd878b369821d80c1be8a140c85e8a0fb1358fcaaba66ca66869213692f227 \
                    size    105555

patchfiles          patch-setup.py-no-usr-local.diff \
                    patch-fix-swig.diff

python.versions     310 311 312 313 314

if {${subport} ne ${name}} {
    depends_build-append \
                    port:swig-python

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md COPYING \
            ${destroot}${docdir}
    }
}
