blob: 9cd0fbc25518eda78513e881e9d5fa2c04f342e6 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001DESCRIPTION = "The MirBSD Korn Shell - an enhanced version of the public domain ksh"
2HOMEPAGE = "http://www.mirbsd.org/mksh.htm"
3SECTION = "base/shell"
4
5LICENSE = "${@bb.utils.contains("TCLIBC", "glibc", "MirOS & ISC", "MirOS", d)}"
Andrew Geissler89770b02020-06-13 10:40:47 -05006LIC_FILES_CHKSUM = "file://main.c;beginline=6;endline=26;md5=6efc2c249328e4d2bd3e595d5b1f9d31 \
Andrew Geissler82c905d2020-04-13 13:39:40 -05007 file://strlcpy.c;beginline=1;endline=17;md5=d953f28f0c43ee29e238ec9bc15df2a0 \
8 "
9
Andrew Geissler89770b02020-06-13 10:40:47 -050010SRC_URI = "http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R59b.tgz"
Andrew Geissler82c905d2020-04-13 13:39:40 -050011
Andrew Geissler89770b02020-06-13 10:40:47 -050012SRC_URI[md5sum] = "dce6abffc2036288540b9ba11dfb2ec8"
13SRC_URI[sha256sum] = "907ed1a9586e7f18bdefdd4a763aaa8397b755e15034aa54f4d753bfb272e0e6"
Andrew Geissler82c905d2020-04-13 13:39:40 -050014
15inherit update-alternatives
16
17S = "${WORKDIR}/${BPN}"
18
Patrick Williams213cb262021-08-07 19:21:33 -050019ALTERNATIVE:${PN} = "sh"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
21ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
22ALTERNATIVE_PRIORITY = "100"
23
24do_compile() {
25 sh ${S}/Build.sh -r
26}
27
28do_install() {
29 install -d ${D}${base_bindir}
30 install -m 0755 ${S}/mksh ${D}${base_bindir}/mksh
31
32 install -d ${D}${sysconfdir}/skel
33 install -m 0644 ${S}/dot.mkshrc ${D}${sysconfdir}/skel/.mkshrc
34}
35
Patrick Williams213cb262021-08-07 19:21:33 -050036RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}"