# $Id: Portfile 52631 2009-06-20 02:44:23Z brett@macports.org $

PortSystem 1.0

name            ksh93
version         2009-05-05
categories      shells
maintainers     brett
description     The AT&T Korn shell
long_description \
    The official version of ksh-93, by David Korn and AT&T research
platforms       darwin freebsd
homepage        http://www.research.att.com/sw/download/
master_sites    http://www.research.att.com/~gsf/download/tgz/

distfiles       ast-ksh.$version.tgz \
                INIT.$version.tgz
checksums       ast-ksh.$version.tgz \
                  md5 dff46f3e047ac35ac78a81c52938991b \
                INIT.$version.tgz \
                  md5 e941c0a95b73c8309e6afff10f79d988

fetch.user      I accept www.opensource.org/licenses/cpl
fetch.password  .

pre-extract {
    xinstall -d ${worksrcpath}
}

extract.dir ${worksrcpath}

use_configure   no

build.cmd       bin/package
build.target    make
build.args      SHELL=sh

destroot {
    set arch [exec ${worksrcpath}/bin/package]
    xinstall -m 555 ${worksrcpath}/arch/${arch}/bin/ksh \
      ${destroot}${prefix}/bin
    xinstall -m 444 ${worksrcpath}/arch/${arch}/man/man1/sh.1 \
      ${destroot}${prefix}/share/man/man1/ksh.1
}
