Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Miscellaneous utilities specific to Debian" |
| 2 | SECTION = "base" |
| 3 | LICENSE = "GPLv2 & SMAIL_GPL" |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=9b912cd0cc654134c0ef3424a0705b94" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 6 | SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | # the package is taken from snapshots.debian.org; that source is static and goes stale |
| 8 | # so we check the latest upstream from a directory that does get updated |
| 9 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/" |
| 10 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 11 | SRC_URI[sha256sum] = "bb5ce6290696b0d623377521ed217f484aa98f7346c5f7c48f9ae3e1acfb7151" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | |
| 13 | inherit autotools update-alternatives |
| 14 | |
| 15 | do_configure_prepend() { |
| 16 | sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am |
| 17 | } |
| 18 | |
| 19 | do_install_append() { |
| 20 | if [ "${base_bindir}" != "${bindir}" ]; then |
| 21 | # Debian places some utils into ${base_bindir} as does busybox |
| 22 | install -d ${D}${base_bindir} |
| 23 | for app in run-parts tempfile; do |
| 24 | mv ${D}${bindir}/$app ${D}${base_bindir}/$app |
| 25 | done |
| 26 | fi |
| 27 | } |
| 28 | |
| 29 | # Note that we package the update-alternatives name. |
| 30 | # |
| 31 | PACKAGES =+ "${PN}-run-parts" |
| 32 | FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils" |
| 33 | |
| 34 | RDEPENDS_${PN} += "${PN}-run-parts" |
| 35 | RDEPENDS_${PN}_class-native = "" |
| 36 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 37 | ALTERNATIVE_PRIORITY = "30" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 38 | ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which" |
| 39 | |
| 40 | ALTERNATIVE_PRIORITY_${PN}-run-parts = "60" |
| 41 | ALTERNATIVE_${PN}-run-parts = "run-parts" |
| 42 | |
| 43 | ALTERNATIVE_${PN}-doc = "which.1" |
| 44 | ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1" |
| 45 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 46 | ALTERNATIVE_LINK_NAME[add-shell] = "${sbindir}/add-shell" |
| 47 | ALTERNATIVE_LINK_NAME[installkernel] = "${sbindir}/installkernel" |
| 48 | ALTERNATIVE_LINK_NAME[remove-shell] = "${sbindir}/remove-shell" |
| 49 | ALTERNATIVE_LINK_NAME[run-parts] = "${base_bindir}/run-parts" |
| 50 | ALTERNATIVE_LINK_NAME[savelog] = "${bindir}/savelog" |
| 51 | ALTERNATIVE_LINK_NAME[tempfile] = "${base_bindir}/tempfile" |
| 52 | ALTERNATIVE_LINK_NAME[which] = "${bindir}/which" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 53 | |
| 54 | BBCLASSEXTEND = "native" |