From ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6 Mon Sep 17 00:00:00 2001 From: Marek Benc Date: Sat, 30 Jun 2018 17:45:14 +0200 Subject: user/mksh: add package, new ksh shell implementation Signed-off-by: Marek Benc --- user/mksh/APKBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 user/mksh/APKBUILD (limited to 'user/mksh/APKBUILD') diff --git a/user/mksh/APKBUILD b/user/mksh/APKBUILD new file mode 100644 index 000000000..b7bcc6564 --- /dev/null +++ b/user/mksh/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Marek Benc +# Maintainer: Marek Benc +pkgname=mksh +pkgver=56c +pkgrel=0 +pkgdesc="MirBSD Korn Shell, a free Korn Shell interpreter" +url="http://mirbsd.de/mksh" +arch="all" +subpackages="$pkgname-doc" +license="MirOS OR ISC" +depends="" +makedepends="" +checkdepends="ed perl" +install="mksh.post-install mksh.post-upgrade mksh.pre-deinstall" +source="http://www.mirbsd.org/MirOS/dist/mir/${pkgname}/${pkgname}-R${pkgver}.tgz" +builddir=$srcdir/$pkgname + +build() { + cd "$builddir" + + # Build the main shell: + /bin/sh ./Build.sh -r + mv test.sh test_mksh.sh + + # Build the compatibility/legacy shell: + CFLAGS="$CFLAGS -DMKSH_BINSHPOSIX -DMKSH_BINSHREDUCED" \ + /bin/sh ./Build.sh -r -L + mv test.sh test_lksh.sh +} + +package() { + cd "$builddir" + + mkdir -p "$pkgdir"/bin + install -m 755 mksh "$pkgdir"/bin + install -m 755 lksh "$pkgdir"/bin + + mkdir -p "$pkgdir"/usr/share/man/man1/ + install -m 644 mksh.1 "$pkgdir"/usr/share/man/man1/ + install -m 644 lksh.1 "$pkgdir"/usr/share/man/man1/ + + mkdir -p "$pkgdir"/usr/share/doc/mksh/examples/ + install -m 644 dot.mkshrc "$pkgdir"/usr/share/doc/mksh/examples/ +} + +check() { + cd "$builddir" + + echo "Running the test suite for mksh:" + ./test_mksh.sh + + echo "Running the test suite for lksh:" + ./test_lksh.sh +} + +sha512sums="7e4cd2d24c6bca2ebad7c6b02d158188e766bd4693d93f5bed198d69238aef078d42ce911431ad4e419e4af55083047d823bfad53973db5c6d8a685482770135 mksh-R56c.tgz" -- cgit v1.2.3-70-g09d2