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

github.setup        hartwork git-delete-merged-branches 7.7.0
github.tarball_from archive
revision            0

categories          devel python
license             GPL-3
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         Command-line tool to delete merged Git branches
long_description    {*}${description}

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  012425e2e3ee79fd131368709ca5d479c73513f8 \
                    sha256  4f43a96e23f0618b5e62bdcd64df6b54d79345a93ceb72abf4261ce92f26e88f \
                    size    38223

python.default_version \
                    314

depends_lib-append  port:py${python.version}-prompt_toolkit \
                    port:py${python.version}-colorama \
                    port:py${python.version}-wcwidth

post-destroot {
    set mandir ${python.prefix}/share/man
    foreach manpage [glob -nocomplain -tails -directory ${destroot}${mandir} man*/*] {
        xinstall -d ${destroot}${prefix}/share/man/[file dirname ${manpage}]
        ln -s ${mandir}/${manpage} ${destroot}${prefix}/share/man/${manpage}
    }

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