# $Id: Portfile 66606 2010-04-18 03:33:30Z brett@macports.org $

PortSystem 1.0

name            ksh93
version         2010-03-09
revision        1
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://www2.research.att.com/~gsf/download/tgz/

distfiles       ast-ksh.$version.tgz \
                INIT.$version.tgz
checksums       ast-ksh.$version.tgz \
                  md5 df8ab5733d1789db00bc2576fb5ecf6f \
                INIT.$version.tgz \
                  md5 48b71bc6046da85764384169bd17a6dc

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

extract.mkdir   yes

patchfiles	patch-jobs.c.diff

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
}

livecheck.type  regex
livecheck.url   http://www2.research.att.com/~gsf/cgi-bin/download.cgi?action=list&name=ast-ksh
livecheck.regex {ast-ksh\.([0-9-]+)\.tgz}
