# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-off set: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 91533 2012-04-04 04:19:56Z ryandesign@macports.org $

PortSystem        1.0
PortGroup python  1.0

name              py-ftputil
version           2.6
categories        python network
license           BSD
platforms         darwin
supported_archs   noarch

maintainers       maiar.org:jason-macports openmaintainer

description       High level Python interface to the ftplib module
long_description  The module ftputil is a high-level interface to the \
                  ftplib module. The FTPHost objects generated from it \
                  allow many operations similar to those of os and \
                  os.path.

distname          ftputil-${version}
extract.suffix    .tar.gz
homepage          http://ftputil.sschwarzer.net/trac/
master_sites      ${homepage}raw-attachment/wiki/Download/${distfiles}?format=raw?dummy=
checksums         md5    df1880064485be39b3e6eeefbd812b03 \
                  sha1   5fe61f7165b309e021011de66bd80f990c0cff3c \
                  rmd160 cd7bd7bfcb40c82b13f5d9daa1ba15a0a26c4b51


python.versions     24 25 26 27

if {$subport != $name} {
  depends_build   port:py${python.version}-distribute

  post-destroot  {
      if {${python.version} == 24 || ${python.version} == 25} {
          delete ${destroot}${prefix}/doc/ftputil
      }
      xinstall -d ${destroot}${prefix}/share/doc/${subport}
      xinstall -m 644 -W ${worksrcpath} README.html README.txt ftputil.html \
          ftputil.txt VERSION PKG-INFO ${destroot}${prefix}/share/doc/${subport}
  }

    livecheck.type  regex
    livecheck.url   ${homepage}raw-attachment/wiki/Download/
    livecheck.regex {>ftputil-([0-9.]+).tar.gz<}
} else {
    livecheck.type      none
}
