blob: ad3672f3e4d19df0298cfe89a9ff290bc323cb75 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Small and fast POSIX-compliant shell"
2HOMEPAGE = "http://gondor.apana.org.au/~herbert/dash/"
3SECTION = "System Environment/Shells"
4
Andrew Geissler9aee5002022-03-30 16:27:02 +00005LICENSE = "BSD-3-Clause & GPL-2.0-or-later"
Brad Bishop19323692019-04-05 15:28:33 -04006LIC_FILES_CHKSUM = "file://COPYING;md5=b5262b4a1a1bff72b48e935531976d2e"
7
8inherit autotools update-alternatives
9
Andrew Geissler89770b02020-06-13 10:40:47 -050010SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz"
William A. Kennington III49e95662021-09-15 16:19:36 -070011SRC_URI[sha256sum] = "db778110891f7937985f29bf23410fe1c5d669502760f584e54e0e7b29e123bd"
Brad Bishop19323692019-04-05 15:28:33 -040012
13EXTRA_OECONF += "--bindir=${base_bindir}"
14
Patrick Williams213cb262021-08-07 19:21:33 -050015ALTERNATIVE:${PN} = "sh"
Brad Bishop19323692019-04-05 15:28:33 -040016ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
17ALTERNATIVE_TARGET[sh] = "${base_bindir}/dash"
18ALTERNATIVE_PRIORITY = "10"
19
Patrick Williams213cb262021-08-07 19:21:33 -050020pkg_postinst:${PN} () {
Brad Bishop19323692019-04-05 15:28:33 -040021 grep -q "^${base_bindir}/dash$" $D${sysconfdir}/shells || echo ${base_bindir}/dash >> $D${sysconfdir}/shells
22}
23
Patrick Williams213cb262021-08-07 19:21:33 -050024pkg_postrm:${PN} () {
Brad Bishop19323692019-04-05 15:28:33 -040025 printf "$(grep -v "^${base_bindir}/dash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
26}