diff options
-rw-r--r-- | user/mksh/APKBUILD | 56 | ||||
-rw-r--r-- | user/mksh/mksh.post-install | 3 | ||||
l--------- | user/mksh/mksh.post-upgrade | 1 | ||||
-rw-r--r-- | user/mksh/mksh.pre-deinstall | 3 |
4 files changed, 63 insertions, 0 deletions
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 <dusxmt@gmx.com> +# Maintainer: Marek Benc <dusxmt@gmx.com> +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" diff --git a/user/mksh/mksh.post-install b/user/mksh/mksh.post-install new file mode 100644 index 000000000..5ba1f2fc6 --- /dev/null +++ b/user/mksh/mksh.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +add-shell '/bin/mksh' +exit 0 diff --git a/user/mksh/mksh.post-upgrade b/user/mksh/mksh.post-upgrade new file mode 120000 index 000000000..29bbd4260 --- /dev/null +++ b/user/mksh/mksh.post-upgrade @@ -0,0 +1 @@ +mksh.post-install
\ No newline at end of file diff --git a/user/mksh/mksh.pre-deinstall b/user/mksh/mksh.pre-deinstall new file mode 100644 index 000000000..82e6d3bfa --- /dev/null +++ b/user/mksh/mksh.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh +remove-shell '/bin/mksh' +exit 0 |