# -*- 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           gnuradio 1.0

name                gr-pcap
maintainers         {michaelld @michaelld} openmaintainer
description         Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
long_description    {*}${description}
license             GPL-3

if {${subport} eq ${name}} {
    version         20170402
    revision        8
    replaced_by     gr37-pcap
    PortGroup       obsolete 1.0
}

subport gr37-pcap {

    name            gr37-pcap

    github.setup    osh gr-pcap f643e518c8d75aa8c9bf474fad51dae235dfddf1
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    version         20170402
    revision        3
    checksums       rmd160 4426c2e9134bacc98e90f72933a9ed523969830c \
                    sha256 e7cacc7343531865c357288d73248764f9f5273d3eadbb8d57eccff9a22395d5

    conflicts \
        gr-pcap

}

depends_lib-append \
    path:bin/scapy-${active_python_version}:py${active_python_version_no_dot}-scapy

# include examples in destroot
post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/examples/
    copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/pcap
}
