diff options
author | Marek Benc <dusxmt@gmx.com> | 2018-06-30 17:45:14 +0200 |
---|---|---|
committer | Dan Theisen <djt@hxx.in> | 2018-07-01 23:06:41 -0700 |
commit | ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6 (patch) | |
tree | 418f2a0120b33c6841a32644ad3c830f64b65732 /user | |
parent | 71842c64dc6311e3c6aebe6ad957c1907057dda6 (diff) | |
download | packages-ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6.tar.gz packages-ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6.tar.bz2 packages-ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6.tar.xz packages-ee28a7d0cb9068beafcf1ea43b003ae8d3e868e6.zip |
user/mksh: add package, new ksh shell implementation
Signed-off-by: Marek Benc <dusxmt@gmx.com>
Diffstat (limited to 'user')
-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 |