# $Id: Portfile 104160 2013-03-18 14:03:31Z ram@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            py-tz
set my_name     pytz
version         2013b
categories-append     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 33

checksums       rmd160 f083493739d726d9f3af3cfd7d4b34e1241a705c \
                sha256 0797293d12ca2f7e5dd5bc0807f521f39d5b60a2c347c48f8362f9fd0174af3f

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
}
