blob: 7cc78a68501c76211b24cbfafbc107fc01068eb3 [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
6SRC_URI = "http://snapshot.debian.org/archive/debian/20190217T160716Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
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
9UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
10
11SRC_URI[md5sum] = "80e2e670d8f6c0036770e971237f1f5c"
12SRC_URI[sha256sum] = "099f1e8a7278b26145a2ba2dda84c4118403bfab38c8d7070a6235a7ffcb55ed"
13
14S = "${WORKDIR}/${BPN}"
15
16inherit autotools update-alternatives
17
18do_configure_prepend() {
19 sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
20}
21
22do_install_append() {
23 if [ "${base_bindir}" != "${bindir}" ]; then
24 # Debian places some utils into ${base_bindir} as does busybox
25 install -d ${D}${base_bindir}
26 for app in run-parts tempfile; do
27 mv ${D}${bindir}/$app ${D}${base_bindir}/$app
28 done
29 fi
30}
31
32# Note that we package the update-alternatives name.
33#
34PACKAGES =+ "${PN}-run-parts"
35FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
36
37RDEPENDS_${PN} += "${PN}-run-parts"
38RDEPENDS_${PN}_class-native = ""
39
40ALTERNATIVE_PRIORITY="30"
41ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
42
43ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
44ALTERNATIVE_${PN}-run-parts = "run-parts"
45
46ALTERNATIVE_${PN}-doc = "which.1"
47ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
48
49ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
50ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
51ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
52ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
53ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
54ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
55ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
56
57BBCLASSEXTEND = "native"