blob: ac3d5b0267488df315806a7e0018c2f345869e9e [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Miscellaneous utilities specific to Debian"
2SECTION = "base"
3LICENSE = "GPLv2 & SMAIL_GPL"
Andrew Geissler5a43b432020-06-13 10:46:56 -05004LIC_FILES_CHKSUM = "file://debian/copyright;md5=9b912cd0cc654134c0ef3424a0705b94"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
Andrew Geissler5a43b432020-06-13 10:46:56 -05006SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz"
Andrew Geissler82c905d2020-04-13 13:39:40 -05007# 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
9UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
10
Andrew Geissler5a43b432020-06-13 10:46:56 -050011SRC_URI[sha256sum] = "bb5ce6290696b0d623377521ed217f484aa98f7346c5f7c48f9ae3e1acfb7151"
Andrew Geissler82c905d2020-04-13 13:39:40 -050012
13inherit autotools update-alternatives
14
15do_configure_prepend() {
16 sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
17}
18
19do_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#
31PACKAGES =+ "${PN}-run-parts"
32FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
33
34RDEPENDS_${PN} += "${PN}-run-parts"
35RDEPENDS_${PN}_class-native = ""
36
Andrew Geissler4ed12e12020-06-05 18:00:41 -050037ALTERNATIVE_PRIORITY = "30"
Andrew Geissler82c905d2020-04-13 13:39:40 -050038ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
39
40ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
41ALTERNATIVE_${PN}-run-parts = "run-parts"
42
43ALTERNATIVE_${PN}-doc = "which.1"
44ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
45
Andrew Geissler4ed12e12020-06-05 18:00:41 -050046ALTERNATIVE_LINK_NAME[add-shell] = "${sbindir}/add-shell"
47ALTERNATIVE_LINK_NAME[installkernel] = "${sbindir}/installkernel"
48ALTERNATIVE_LINK_NAME[remove-shell] = "${sbindir}/remove-shell"
49ALTERNATIVE_LINK_NAME[run-parts] = "${base_bindir}/run-parts"
50ALTERNATIVE_LINK_NAME[savelog] = "${bindir}/savelog"
51ALTERNATIVE_LINK_NAME[tempfile] = "${base_bindir}/tempfile"
52ALTERNATIVE_LINK_NAME[which] = "${bindir}/which"
Andrew Geissler82c905d2020-04-13 13:39:40 -050053
54BBCLASSEXTEND = "native"