Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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 = "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 |
| 9 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/" |
| 10 | |
| 11 | SRC_URI[md5sum] = "a6dcd496b4f79b3c452c3a74c2d3f89c" |
| 12 | SRC_URI[sha256sum] = "c061ab99aea61f892043b7624b021ab5b193e9c6bbfd474da0fbcdd506be1eb2" |
| 13 | |
| 14 | S = "${WORKDIR}/${BPN}" |
| 15 | |
| 16 | inherit autotools update-alternatives |
| 17 | |
| 18 | do_configure_prepend() { |
| 19 | sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am |
| 20 | } |
| 21 | |
| 22 | do_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 | # |
| 34 | PACKAGES =+ "${PN}-run-parts" |
| 35 | FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils" |
| 36 | |
| 37 | RDEPENDS_${PN} += "${PN}-run-parts" |
| 38 | RDEPENDS_${PN}_class-native = "" |
| 39 | |
| 40 | ALTERNATIVE_PRIORITY="30" |
| 41 | ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which" |
| 42 | |
| 43 | ALTERNATIVE_PRIORITY_${PN}-run-parts = "60" |
| 44 | ALTERNATIVE_${PN}-run-parts = "run-parts" |
| 45 | |
| 46 | ALTERNATIVE_${PN}-doc = "which.1" |
| 47 | ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1" |
| 48 | |
| 49 | ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell" |
| 50 | ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel" |
| 51 | ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell" |
| 52 | ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts" |
| 53 | ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog" |
| 54 | ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile" |
| 55 | ALTERNATIVE_LINK_NAME[which]="${bindir}/which" |
| 56 | |
| 57 | BBCLASSEXTEND = "native" |