1 # Contributor: Mark Taylor <skymt0@gmail.com>
2 # Contributor: Stefan Husmann <stefan-husmann@t-online.de>
10 pkgdesc="AT&T's Korn shell"
11 arch=('i686' 'x86_64')
12 url="http://www.kornshell.com/"
15 install=${pkgname}.install
16 source=(${pkgname}.install)
18 md5sums=('3e2580395329d97d9e031463648aba70')
25 if [ $(which curl 2>/dev/null) ]; then
26 GET_CMD="curl -# -A'Mozilla/5.0' -u'I accept www.opensource.org/licenses/cpl:.' --remote-name-all"
28 elif [ $(which wget 2>/dev/null) ]; then
29 GET_CMD="wget -U'Mozilla/5.0' --user='I accept www.opensource.org/licenses/cpl' --password='.'"
32 echo "Please install eighter wget or curl."
37 $GET_PIPE http://www.opensource.org/licenses/cpl1.0.txt | sed -e '/THE ACCOMPANYING/,/<\/div>/!d' -e 's/\s*<[^>]*>//g' > LICENSE
38 ${PAGER:-more} LICENSE
40 echo -n "I have read and accepted the license (yes/no): "
42 [ "$answer" != "yes" ] && return 0
44 # We have to evaluate $GET_CMD, otherwise the username would be 'I.
45 eval $GET_CMD http://www2.research.att.com/~gsf/download/tgz/{INIT,ast-ksh}.${_pkgver}.tgz
46 cat <<_END | md5sum -c
47 2870a583f7c170d4f67b1d9858d6b091 INIT.2011-02-08.tgz
48 5481d41adf067503afbad92d048ff91a ast-ksh.2011-02-08.tgz
52 echo "Checksum valaidation failed."
57 tar xf INIT.${_pkgver}.tgz || return 1
58 tar xf ast-ksh.${_pkgver}.tgz || return 1
60 ./bin/package only make ast-ksh || return 1
62 install -Dm755 arch/linux.*/bin/ksh $pkgdir/bin/ksh || return 1
63 install -Dm644 arch/linux.*/man/man1/sh.1 $pkgdir/usr/share/man/man1/ksh.1 || return 1
64 install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1