# $Id: Portfile 63756 2010-02-14 05:51:52Z ryandesign@macports.org $

PortSystem                  1.0

name                        kerberos5
conflicts                   e2fsprogs
version                     1.7.1
set branch                  [join [lrange [split ${version} .] 0 1] .]
categories                  net security
maintainers                 nomaintainer
platforms                   darwin
homepage                    http://web.mit.edu/kerberos/
master_sites                ${homepage}dist/krb5/${branch}/
distname                    krb5-${version}
distfiles                   ${distname}-signed.tar
worksrcdir                  ${distname}/src

description                 Kerberos is a network authentication protocol.

long_description            Kerberos is a network authentication protocol. \
                            It is designed to provide strong authentication \
                            for client/server applications by using secret-key \
                            cryptography. A free implementation of this protocol \
                            is  available from the Massachusetts Institute of \
                            Technology. Kerberos is available in many commercial \
                            products as well.

checksums                   md5     4206991cb65e0d0ab69748e63ca67388 \
                            sha1    6cb610675a49e479faa3ca6acaf2e29ace7f2d2e \
                            rmd160  010cf3e0593ca128fdb7860e375f2d3a0a9b0796

depends_build               bin:gpg:gnupg

extract.cmd                 cat
extract.pre_args

configure.args              --mandir=${prefix}/share/man

post-configure {
    reinplace -E {s|-arch [^ ]+||g} \
        ${worksrcpath}/krb5-config
}

post-extract {
    system "cd ${workpath} && gzip -dc ${distname}.tar.gz | tar -xf -"
}

#post-extract {
#   if { system "cd ${workpath} && gpg --verify ${distame}.tar.gz.asc \
#       ${distname}-${version}.tar.gz && gzip -dc ${distame}.tar.gz | tar -xf" }
#   {} else {
#       ui_error "pgp signature not valid"
#       exit(1)
#   }
#}
