# $Id: Portfile 106880 2013-06-09 17:11:44Z larryv@macports.org $

PortSystem 1.0

name            ksh93
version         2012-08-01
conflicts       pdksh
categories      shells
maintainers     nomaintainer
license         CPL-1

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 \
                rmd160  74bf4735182a6b527e3eb5c5ae6d7854ea72d78b \
                sha256  e6192cfa52a6a9fd20618cbaf3fa81f0cc9fd83525500757e83017275e962851 \
                INIT.$version.tgz \
                rmd160  48f1830bc85a26125dd986256d38be435668d445 \
                sha256  c40cf57e9b2186271a9c362a560aa4a6e25ba911a8258ab931d2bbdbce44cfe5

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

extract.mkdir   yes

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}
