Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 1 | DESCRIPTION = "The MirBSD Korn Shell - an enhanced version of the public domain ksh" |
| 2 | HOMEPAGE = "http://www.mirbsd.org/mksh.htm" |
| 3 | SECTION = "base/shell" |
| 4 | |
| 5 | LICENSE = "${@bb.utils.contains("TCLIBC", "glibc", "MirOS & ISC", "MirOS", d)}" |
| 6 | LIC_FILES_CHKSUM = "file://main.c;beginline=6;endline=26;md5=6efc2c249328e4d2bd3e595d5b1f9d31 \ |
| 7 | file://strlcpy.c;beginline=1;endline=17;md5=d953f28f0c43ee29e238ec9bc15df2a0 \ |
| 8 | " |
| 9 | |
| 10 | SRC_URI = "http://www.mirbsd.org/MirOS/dist/mir/${BPN}/${BPN}-R${PV}.tgz" |
| 11 | |
| 12 | SRC_URI[sha256sum] = "77ae1665a337f1c48c61d6b961db3e52119b38e58884d1c89684af31f87bc506" |
| 13 | |
| 14 | UPSTREAM_CHECK_REGEX = "${BPN}-R(?P<pver>.*)\.tgz" |
| 15 | |
| 16 | inherit update-alternatives |
| 17 | |
| 18 | S = "${WORKDIR}/${BPN}" |
| 19 | |
| 20 | ALTERNATIVE:${PN} = "sh" |
| 21 | ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" |
| 22 | ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" |
| 23 | ALTERNATIVE_PRIORITY = "100" |
| 24 | |
| 25 | do_compile() { |
| 26 | sh ${S}/Build.sh -r |
| 27 | } |
| 28 | |
| 29 | do_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 | |
| 37 | RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}" |