blob: a69d01e0f9567368b62070427694be1c771b9566 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Miscellaneous utilities specific to Debian"
2SECTION = "base"
3LICENSE = "GPLv2 & SMAIL_GPL"
4LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
5
Brad Bishop96ff1982019-08-19 13:50:42 -04006SRC_URI = "http://snapshot.debian.org/archive/debian/20190717T213444Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
Brad Bishop19323692019-04-05 15:28:33 -04007# 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
Brad Bishop96ff1982019-08-19 13:50:42 -040011SRC_URI[md5sum] = "ca57cc6621275346d7d516ab0b5fa1f5"
12SRC_URI[sha256sum] = "2cc7de3afc6df1cf6d00af9938efac7ee8f739228e548e512ddc186b6a7be221"
Brad Bishop19323692019-04-05 15:28:33 -040013
14inherit autotools update-alternatives
15
16do_configure_prepend() {
17 sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
18}
19
20do_install_append() {
21 if [ "${base_bindir}" != "${bindir}" ]; then
22 # Debian places some utils into ${base_bindir} as does busybox
23 install -d ${D}${base_bindir}
24 for app in run-parts tempfile; do
25 mv ${D}${bindir}/$app ${D}${base_bindir}/$app
26 done
27 fi
28}
29
30# Note that we package the update-alternatives name.
31#
32PACKAGES =+ "${PN}-run-parts"
33FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
34
35RDEPENDS_${PN} += "${PN}-run-parts"
36RDEPENDS_${PN}_class-native = ""
37
38ALTERNATIVE_PRIORITY="30"
39ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
40
41ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
42ALTERNATIVE_${PN}-run-parts = "run-parts"
43
44ALTERNATIVE_${PN}-doc = "which.1"
45ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
46
47ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
48ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
49ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
50ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
51ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
52ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
53ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
54
55BBCLASSEXTEND = "native"