# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           gnuradio 1.0

name                gr-satellites
license             GPL-3
maintainers         {ra1nb0w @ra1nb0w} {michaelld @michaelld} openmaintainer
description         GNU Radio decoders for several Amateur satellites.
long_description    {*}${description}

if {${subport} eq ${name}} {

    github.setup    daniestevez gr-satellites 3.16.0 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    checksums       rmd160  eb850aec81467890ab4486aca3aa40cd55a28bb4 \
                    sha256  cd519ad6871d0d771ab602992b76e95fa26c7cfa5502757a49b45b7d1793af4e \
                    size    3903216
    revision        0

    conflicts gr37-satellites

    github.livecheck.regex  {(3\.[0-9.]+)}

}

subport gr37-satellites {

    name gr37-satellites

    github.setup    daniestevez gr-satellites 1.8.4 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    checksums       rmd160  ac02a21377a654386ce706a00352915e97ddf3c0 \
                    sha256  4f8ff528750b89a4d33f173198f24a3c78badb4a122feff911c84ac925779133 \
                    size    760268
    revision        2

    conflicts gr-satellites

    depends_lib-append \
        port:libfec

    livecheck.type none

}

depends_run-append \
    port:py${active_python_version_no_dot}-construct \
    port:py${active_python_version_no_dot}-requests

post-destroot {
    # copy GNU Radio examples
    xinstall -m 755 -d ${destroot}${prefix}/share/gnuradio/examples/satellites
    file copy {*}[glob ${worksrcpath}/examples/*] \
        ${destroot}${prefix}/share/gnuradio/examples/satellites
}

