# -*- 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
# $Id: Portfile 119385 2014-04-24 20:35:34Z mf2k@macports.org $

PortSystem 1.0
PortGroup           python 1.0

name                py-serial
version             2.7
python.versions     25 26 27 31 32 33 34
categories-append   comms
platforms           darwin
maintainers         mf2k openmaintainer
license             PSF
description         Python Serial Port Extension
long_description    This module incapsulates the access for the serial port. \
                    It provides backends for standard Python running on Windows, \
                    Linux, BSD (possibly any POSIX compliant system) and Jython. \
                    The module named "serial" automatically selects the appropriate \
                    backend.
homepage            http://pyserial.sourceforge.net/
master_sites        http://pypi.python.org/packages/source/p/pyserial
distname            pyserial-${version}

checksums           rmd160  b86758d74e8f3cd61430bf7d76db496ae732f257 \
                    sha256  3542ec0838793e61d6224e27ff05e8ce4ba5a5c5cc4ec5c6a3e8d49247985477

if {${name} ne ${subport}} {
    post-destroot {
        xinstall -m 644 -W ${worksrcpath} CHANGES.txt LICENSE.txt README.txt \
            ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath}/examples enhancedserial.py \
            scan.py tcp_serial_redirect.py \
            wxSerialConfigDialog.py wxSerialConfigDialog.wxg \
            wxTerminal.py wxTerminal.wxg \
            ${destroot}${prefix}/share/doc/${subport}/examples
    }
    livecheck.type      none
} else {
    livecheck.url       http://pypi.python.org/pypi/pyserial
    livecheck.regex     pyserial-(\\d+(\\.\\d+)+)
}
