Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [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=0651e575e39d1a3e884562e25d491fc7 \ |
| 7 | file://strlcpy.c;beginline=1;endline=17;md5=d953f28f0c43ee29e238ec9bc15df2a0 \ |
| 8 | " |
| 9 | |
| 10 | SRC_URI = "http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R58.tgz" |
| 11 | |
| 12 | SRC_URI[md5sum] = "6922a3e2228de2f0e78ff25398ccf8df" |
| 13 | SRC_URI[sha256sum] = "608beb7b71870b23309ba1da8ca828da0e4540f2b9bd981eb39e04f8b7fc678c" |
| 14 | |
| 15 | inherit update-alternatives |
| 16 | |
| 17 | S = "${WORKDIR}/${BPN}" |
| 18 | |
| 19 | ALTERNATIVE_${PN} = "sh" |
| 20 | ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" |
| 21 | ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" |
| 22 | ALTERNATIVE_PRIORITY = "100" |
| 23 | |
| 24 | do_compile() { |
| 25 | sh ${S}/Build.sh -r |
| 26 | } |
| 27 | |
| 28 | do_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 | |
| 36 | RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh', '', d)}" |