blob: 6b665fb2c3f879632a7cfafffd4b29128f59ece3 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Miscellaneous utilities specific to Debian"
2SECTION = "base"
3LICENSE = "GPLv2 & SMAIL_GPL"
4LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
5
6SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz"
7
8SRC_URI[md5sum] = "487524518cd5833a6a4f7007b5d1bd5b"
9SRC_URI[sha256sum] = "a531c23e0105fe01cfa928457a8343a1e947e2621b3cd4d05f4e9656020c63b7"
10
11S = "${WORKDIR}/${BPN}"
12
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"
35
36
37ALTERNATIVE_PRIORITY="100"
38ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
39ALTERNATIVE_${PN}-run-parts = "run-parts"
40
41ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
42ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
43ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
44ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
45ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
46ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
47ALTERNATIVE_LINK_NAME[which]="${bindir}/which"