# -*- 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                upt
version             0.12
revision            5

categories-prepend  sysutils
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {@korusuke somaiya.edu:karan.sheth} {reneeotten @reneeotten} openmaintainer

description         Package software from any package manager to any distribution
long_description    {*}${description}

homepage            https://framagit.org/upt/upt

checksums           rmd160  78dbb0c3a26ff4062ae1b2f735ce2fe54e2d10f6 \
                    sha256  9bd23c7f7c277f2efab3d6ffcaffbfcb47c696dbfb4fe41eea4ae2dc58e774c2 \
                    size    32410

python.default_version  314

patchfiles-append   patch-manpage-setup.py.diff

depends_lib-append \
                port:py${python.version}-colorlog \
                port:py${python.version}-packaging \
                port:py${python.version}-spdx-lookup \
                port:py${python.version}-setuptools

depends_run-append \
                port:py${python.version}-upt-cpan \
                port:py${python.version}-upt-macports \
                port:py${python.version}-upt-pypi \
                port:py${python.version}-upt-rubygems

test.run        yes
python.test_framework unittest

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

    # link man page; must be only one upt version at time
    ln -s ${python.prefix}/share/man/man1/${name}.1 \
        ${destroot}${prefix}/share/man/man1/
}
