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

github.setup        openSUSE osc 1.5.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories          devel python
platforms           {darwin any}
supported_archs     noarch
license             {GPL-2 GPL-3}
maintainers         {raimue @raimue} \
                    openmaintainer

description         A command line client for the openSUSE build service

long_description    osc is a subversion-like client written in Python. \
                    It serves as client for the source code repository part \
                    of the openSUSE build service, and is used to edit \
                    metadata or query about build results.

homepage            https://en.opensuse.org/openSUSE:OSC

checksums           rmd160  2689401ab4103c5b173dfb379f28b0f944d00505 \
                    sha256  7e9faa808e97e214a15af267883b08d7762e978bffc917b2e147ee95a8f9c5a8 \
                    size    356879

patchfiles          patch-config.diff \
                    patch-build-disable.diff

python.default_version 311

depends_lib-append  port:py${python.version}-cryptography \
                    port:py${python.version}-urllib3

depends_run         port:obs-build-helpers

post-patch {
    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/osc/conf.py
}

# exclude beta releases from livecheck
github.livecheck.regex {([0-9\.]+)}

test.run            yes
