# -*- 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-iridium
license             GPL-3+
maintainers         {ra1nb0w @ra1nb0w} {michaelld @michaelld} openmaintainer
description         Iridium burst detector and demodulator.
long_description    {*}${description}

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

    github.setup    muccc gr-iridium 48cdeafdaf80b99e3435bcf8d4b7babaf897a8ae
    version         20201115-[string range ${github.version} 0 7]
    checksums       rmd160  625bc88641b142eebd0f8fb4bbdcb85ab8183f82 \
                    sha256  94cd96914e2fddd3184130ca1f327b48fce6fac2b6c07db8c0b4f1e912b51d98 \
                    size    132094
    # Change to archive or releases with next update
    github.tarball_from tarball
    revision        1
    github.livecheck.branch maint-3.8

    conflicts gr37-iridium

}

subport gr37-iridium {

    # Remove with next update
    dist_subdir     $subport

    github.setup    muccc gr-iridium 7d883ddb8870011b98645e4b1a9ed5bb4658bdbf
    version         20200715-[string range ${github.version} 0 7]
    checksums       rmd160  dfeace42d299913f7b0ebf70ffca1b443db0572f \
                    sha256  a41903406334db9e93800ec5ec066f5ebe889c0f49df6f513f82a666c79079ed \
                    size    143175
    # Change to archive or releases with next update
    github.tarball_from tarball
    revision        2
    git.branch      maint-3.7
    github.livecheck.branch maint-3.7

    conflicts gr-iridium

    patchfiles-append \
        gr3.7-cmake-boost.patch
}

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