# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 
# $Id: Portfile 71797 2010-09-23 15:06:18Z jameskyle@macports.org $
# vim: set fileencoding=utf-8 tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab filetype=tcl :

PortSystem	    1.0
PortGroup python26  1.0

name		    py26-mechanize
version		    0.2.2
categories	    python www
platforms	    darwin
maintainers	    openmaintainer krischik
description	    Stateful programmatic web browsing
long_description    Stateful programmatic web browsing, after Andy \
		    Lester's Perl module WWW::Mechanize.

homepage	    http://wwwsearch.sourceforge.net/mechanize
master_sites	    ${homepage}/src
distname	    mechanize-${version}
checksums           md5     22fd64c71c065619d27ea8870da6ca68 \
                    sha1    b0a13012a15c874eb5971c2d59bd447f223a45ec \
                    rmd160  9283aca83f04f623a98eddbc3b5afd3a548291df

depends_lib-append  port:py26-clientform
		    
test.run	    yes
test.cmd	    ${python.bin}
test.target	    test.py

post-destroot {
    foreach f [glob -directory ${worksrcpath}/ *.txt *.html] {
	copy $f ${destroot}${prefix}/share/doc/${name}/[file tail $f]
    }
    foreach f [glob -directory ${worksrcpath}/examples *] {
	copy $f ${destroot}${prefix}/share/doc/${name}/examples/[file tail $f]
    }
}
