Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Miscellaneous utilities specific to Debian" |
| 2 | SECTION = "base" |
| 3 | LICENSE = "GPLv2 & SMAIL_GPL" |
| 4 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f" |
| 5 | |
| 6 | SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz" |
| 7 | |
| 8 | SRC_URI[md5sum] = "487524518cd5833a6a4f7007b5d1bd5b" |
| 9 | SRC_URI[sha256sum] = "a531c23e0105fe01cfa928457a8343a1e947e2621b3cd4d05f4e9656020c63b7" |
| 10 | |
| 11 | S = "${WORKDIR}/${BPN}" |
| 12 | |
| 13 | inherit autotools update-alternatives |
| 14 | |
| 15 | do_configure_prepend() { |
| 16 | sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am |
| 17 | } |
| 18 | |
| 19 | do_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 | # |
| 31 | PACKAGES =+ "${PN}-run-parts" |
| 32 | FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils" |
| 33 | |
| 34 | RDEPENDS_${PN} += "${PN}-run-parts" |
| 35 | |
| 36 | |
| 37 | ALTERNATIVE_PRIORITY="100" |
| 38 | ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which" |
| 39 | ALTERNATIVE_${PN}-run-parts = "run-parts" |
| 40 | |
| 41 | ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell" |
| 42 | ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel" |
| 43 | ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell" |
| 44 | ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts" |
| 45 | ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog" |
| 46 | ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile" |
| 47 | ALTERNATIVE_LINK_NAME[which]="${bindir}/which" |