[meta-openembedded,v2] mksh: add version 56

Submitted by Eduardas Meile on Dec. 6, 2018, 3:33 p.m. | Patch ID: 156958

Details

Message ID 20181206153300.402-1-eduardas.m@fods.com
State Accepted
Commit 0bb29681c49516d83a448dae383d7870e265805d
Headers show

Commit Message

Eduardas Meile Dec. 6, 2018, 3:33 p.m.
The MirBSD Korn Shell is a permissively licensed shell currently used
by Android.

Signed-off-by: Eduardas Meile <eduardas.m@fods.com>
---
 meta-oe/recipes-shells/mksh/mksh_56.bb | 36 ++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-shells/mksh/mksh_56.bb

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-shells/mksh/mksh_56.bb b/meta-oe/recipes-shells/mksh/mksh_56.bb
new file mode 100644
index 000000000..324b5b611
--- /dev/null
+++ b/meta-oe/recipes-shells/mksh/mksh_56.bb
@@ -0,0 +1,36 @@ 
+DESCRIPTION = "The MirBSD Korn Shell - an enhanced version of the public domain ksh"
+HOMEPAGE = "http://www.mirbsd.org/mksh.htm"
+SECTION = "base/shell"
+
+LICENSE = "${@bb.utils.contains("TCLIBC", "glibc", "MirOS & ISC", "MirOS", d)}"
+LIC_FILES_CHKSUM = "file://main.c;beginline=6;endline=25;md5=7204fec4d12912f2a13fe8745bc356f9 \
+                    file://strlcpy.c;beginline=1;endline=17;md5=d953f28f0c43ee29e238ec9bc15df2a0 \
+                   "
+
+SRC_URI = "http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R56c.tgz"
+
+SRC_URI[md5sum] = "4799a9ac6d55871d79ba66713d928663"
+SRC_URI[sha256sum] = "dd86ebc421215a7b44095dc13b056921ba81e61b9f6f4cdab08ca135d02afb77"
+
+inherit update-alternatives
+
+S = "${WORKDIR}/${PN}"
+
+ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
+ALTERNATIVE_PRIORITY = "100"
+
+do_compile() {
+    sh ${S}/Build.sh -r
+}
+
+do_install() {
+    install -d ${D}${base_bindir}
+    install -m 0755 ${S}/mksh ${D}${base_bindir}/mksh
+
+    install -d ${D}${sysconfdir}/skel
+    install -m 0644 ${S}/dot.mkshrc ${D}${sysconfdir}/skel/.mkshrc
+}
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}"