# $Id: Portfile 92071 2012-04-17 07:10:16Z mww@macports.org $

PortSystem 1.0
PortGroup python27 1.0

name                getmail
version             4.26.0
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           md5     a45622b355b649071a337c661533453a \
                    sha1    b350c98db9883365444c59e06ffc6672c68fa0f7 \
                    rmd160  cc8dc8fa799fbf65efbfa47d99509d26228d709f
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
}

