blob: 300e6f1312a015671925a830591ae3e31ce330af [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -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/20180129T164727Z/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] = "a6dcd496b4f79b3c452c3a74c2d3f89c"
12SRC_URI[sha256sum] = "c061ab99aea61f892043b7624b021ab5b193e9c6bbfd474da0fbcdd506be1eb2"
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"