APP=mksh
VERSION=R56c
BUILD=1sml
HOMEPAGE='https://www.mirbsd.org/mksh.htm'
DOWNLOAD='http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R56c.tgz'
DESC="MirBSD Korn Shell, successor to the pdksh"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tgz
  cd "$APP"
  fixbuilddirpermissions

  chmod +x Build.sh
  CFLAGS="-static -O3 -fPIC" ./Build.sh

  install -Dm 644 mksh.1 $PKG/share/man/man1/mksh.1
  install -Dm 755 mksh $PKG/bin/mksh

  head -n 26 Build.sh > $PKGDOCS/LICENSE

  mkfinalpkg
}

SHA512SUMS="
7e4cd2d24c6bca2ebad7c6b02d158188e766bd4693d93f5bed198d69238aef078d42ce911431ad4e419e4af55083047d823bfad53973db5c6d8a685482770135  mksh-R56c.tgz
"
