# $Id: Portfile 106414 2013-05-25 15:34:14Z mww@macports.org $

PortSystem 1.0
PortGroup python27 1.0

name                getmail
version             4.39.1
categories          mail python
platforms           darwin
maintainers         mww
license             GPL-2
description         extensible mail retrieval system with POP3, IMAP4, SSL support
long_description    getmail version 4 is a flexible, extensible mail retrieval \
                    system with support for POP3, IMAP4, SSL variants of both, \
                    maildirs, mboxrd files, external MDAs, arbitrary message \
                    filtering, single-user and domain-mailboxes, and many \
                    other useful features.
# getmail does not contain binary code
supported_archs     noarch

homepage            http://pyropus.ca/software/getmail/
master_sites        ${homepage}/old-versions/
checksums           rmd160  99130cff4a22721b070dc895c863d722ee748ca6 \
                    sha256  8b908dc7f55960a7b03ea00ae217207cd66a49acb2ae1f82390d051b6de695c7
dist_subdir         ${name}
patchfiles          patch-setup.py.diff

python.link_binaries_suffix

post-destroot {
    foreach manfile [glob -tails -directory ${destroot}${python.prefix}/share/man/man1 *] {
        file rename ${destroot}${python.prefix}/share/man/man1/${manfile} \
            ${destroot}${prefix}/share/man/man1/${manfile}
    }
    delete ${destroot}${prefix}/share/doc/${name}
    move ${destroot}${python.prefix}/share/doc/${name} \
        ${destroot}${prefix}/share/doc
}

