# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 102584 2013-02-05 04:25:13Z larryv@macports.org $

PortSystem       1.0
PortGroup        python 1.0

name             py-crypto
version          2.6

categories-append      security
license          public-domain PSF
platforms        darwin freebsd
maintainers      ram openmaintainer
description      collection of cryptographic algorithms and protocols for python
long_description collection of cryptographic algorithms and protocols, \
  implemented for use from python. Among are MD2, MD4, RIPEMD, AES, \
  ARC2, Blowfish, CAST, DES, Triple-DES, IDEA, RC5, ARC4, simple XOR, \
  RSA, DSA, ElGamal, qNEW.

python.versions  24 25 26 27 31 32

homepage         http://www.dlitz.net/software/pycrypto/
master_sites     http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
distname         pycrypto-${version}

checksums           rmd160  5782b529d59f2a62951607fdafaa434aea13ee0a \
                    sha256  7293c9d7e8af2e44a82f86eb9c3b058880f4bcc884bf3ad6c8a34b64986edde8

test.run         yes
test.target      test

if {${name} != ${subport}} {
  post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
    xinstall -m 644 -W ${worksrcpath} ACKS ChangeLog COPYRIGHT README TODO \
      ${destroot}${prefix}/share/doc/${subport}
  }
}

if {${name} == ${subport}} {
  livecheck.type   regex
  livecheck.url    ${homepage}
  livecheck.regex  pycrypto-(\[0-9\.\]+).tar.gz
} else {
  livecheck.type   none
}
