# $Id: Portfile 92116 2012-04-19 00:26:11Z ram@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            py-tz
set my_name     pytz
version         2012c
categories      python devel
platforms       darwin
supported_archs noarch
maintainers     ram openmaintainer
license         MIT

description     World Timezone Definitions for Python
long_description \
    pytz brings the Olson tz database into Python. This library allows \
    accurate and cross platform timezone calculations.

homepage        http://pytz.sourceforge.net/
master_sites    http://cheeseshop.python.org/packages/source/p/pytz/
distname        ${my_name}-${version}
#use_zip         yes

python.versions 24 25 26 27 31 32

checksums       rmd160 a5c8260db88459e20a39f564ca18f3e70835e79e \
                sha256 b6bd04ec1f866588377d4ada676c123afce4a60fa22b124006a327792e055611

post-destroot {
    if {${name} != ${subport}} {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W $worksrcpath CHANGES.txt LICENSE.txt README.txt \
        ${destroot}${docdir}
    }
}

if {${name} == ${subport}} {
  livecheck.type  regex
  livecheck.url   ${master_sites}?C=M&O=D
  livecheck.regex ${my_name}-(\\d+\\w?)
} else {
  livecheck.type  none
}
