Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Miscellaneous utilities specific to Debian" |
| 2 | SECTION = "base" |
| 3 | LICENSE = "GPLv2 & SMAIL_GPL" |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=9b912cd0cc654134c0ef3424a0705b94" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 6 | SRC_URI = "http://snapshot.debian.org/archive/debian/20200929T025235Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 11 | SRC_URI[sha256sum] = "3b680e81709b740387335fac8f8806d71611dcf60874e1a792e862e48a1650de" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | |
| 13 | inherit autotools update-alternatives |
| 14 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 15 | S = "${WORKDIR}/debianutils" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | do_configure_prepend() { |
| 17 | sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am |
| 18 | } |
| 19 | |
| 20 | do_install_append() { |
| 21 | if [ "${base_bindir}" != "${bindir}" ]; then |
| 22 | # Debian places some utils into ${base_bindir} as does busybox |
| 23 | install -d ${D}${base_bindir} |
| 24 | for app in run-parts tempfile; do |
| 25 | mv ${D}${bindir}/$app ${D}${base_bindir}/$app |
| 26 | done |
| 27 | fi |
| 28 | } |
| 29 | |
| 30 | # Note that we package the update-alternatives name. |
| 31 | # |
| 32 | PACKAGES =+ "${PN}-run-parts" |
| 33 | FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils" |
| 34 | |
| 35 | RDEPENDS_${PN} += "${PN}-run-parts" |
| 36 | RDEPENDS_${PN}_class-native = "" |
| 37 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 38 | ALTERNATIVE_PRIORITY = "30" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 39 | ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which" |
| 40 | |
| 41 | ALTERNATIVE_PRIORITY_${PN}-run-parts = "60" |
| 42 | ALTERNATIVE_${PN}-run-parts = "run-parts" |
| 43 | |
| 44 | ALTERNATIVE_${PN}-doc = "which.1" |
| 45 | ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1" |
| 46 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 47 | ALTERNATIVE_LINK_NAME[add-shell] = "${sbindir}/add-shell" |
| 48 | ALTERNATIVE_LINK_NAME[installkernel] = "${sbindir}/installkernel" |
| 49 | ALTERNATIVE_LINK_NAME[remove-shell] = "${sbindir}/remove-shell" |
| 50 | ALTERNATIVE_LINK_NAME[run-parts] = "${base_bindir}/run-parts" |
| 51 | ALTERNATIVE_LINK_NAME[savelog] = "${bindir}/savelog" |
| 52 | ALTERNATIVE_LINK_NAME[tempfile] = "${base_bindir}/tempfile" |
| 53 | ALTERNATIVE_LINK_NAME[which] = "${bindir}/which" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
| 55 | BBCLASSEXTEND = "native" |