blob: e3a8ca8b5e21dcbfa6622fe9b63877a670304243 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001DESCRIPTION = "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)}"
6LIC_FILES_CHKSUM = "file://main.c;beginline=6;endline=26;md5=6efc2c249328e4d2bd3e595d5b1f9d31 \
7 file://strlcpy.c;beginline=1;endline=17;md5=d953f28f0c43ee29e238ec9bc15df2a0 \
8 "
9
10SRC_URI = "http://www.mirbsd.org/MirOS/dist/mir/${BPN}/${BPN}-R${PV}.tgz"
11
12SRC_URI[sha256sum] = "77ae1665a337f1c48c61d6b961db3e52119b38e58884d1c89684af31f87bc506"
13
14UPSTREAM_CHECK_REGEX = "${BPN}-R(?P<pver>.*)\.tgz"
15
16inherit update-alternatives
17
18S = "${WORKDIR}/${BPN}"
19
20ALTERNATIVE:${PN} = "sh"
21ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
22ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
23ALTERNATIVE_PRIORITY = "100"
24
25do_compile() {
26 sh ${S}/Build.sh -r
27}
28
29do_install() {
30 install -d ${D}${base_bindir}
31 install -m 0755 ${S}/mksh ${D}${base_bindir}/mksh
32
33 install -d ${D}${sysconfdir}/skel
34 install -m 0644 ${S}/dot.mkshrc ${D}${sysconfdir}/skel/.mkshrc
35}
36
37RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}"