# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-spf
version			1.6
revision		1
categories-append	mail
license			PSF
platforms		darwin
supported_archs	noarch
maintainers		nomaintainer
description		python module for SPF (Sender Permitted From)
long_description	py-spf is a python module for Sender Permitted From. \
				SPF does email sender validation. For more information \
				about SPF, please see http://spf.pobox.com.

homepage		http://www.wayforward.net/spf/
master_sites	${homepage}
distname		pyspf-${version}
checksums		md5 7ff35d8f9db41f2f7e0068f78f243a3d

python.versions	24

if {${name} ne ${subport}} {
    depends_lib-append	port:py${python.version}-dns

    patch	{
        reinplace "s|test-1.9.5.txt|${worksrcpath}/test/test-1.9.5.txt|g" \
            ${worksrcpath}/test/testspf.py
    }

    test.run		yes
    test.cmd		${python.bin} test/testspf.py
    test.env		PYTHONPATH=${worksrcpath}/build/lib
    test.target

    post-destroot	{
        xinstall -m 644 -W ${worksrcpath} README CHANGELOG \
            ${destroot}${prefix}/share/doc/${subport}
    }
}
