# $Id: Portfile 88940 2012-01-15 06:53:28Z ram@macports.org $

PortSystem       1.0
PortGroup        python 1.0

name             py-crypto
version          2.5

categories       python security
license          public-domain PSF
platforms        darwin freebsd
maintainers      jwa 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        md5 783e45d4a1a309e03ab378b00f97b291 \
                 sha1 1fe50712e0776b45900f8032357201239223ab7e \
                 rmd160 12f814b7c5e8842aa61bf28c5e877bba4433fdbe

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
}
