tar: Switch to INC_PR and fix native builds.
[openembedded.git] / recipes / tar / tar.inc
blob0e348557e64d3faa76d64bdd349c26b688277524
1 DESCRIPTION = "GNU tar saves many files together into a single tape \
2 or disk archive, and can restore individual files from the archive."
3 SECTION = "base"
4 LICENSE = "GPLv3"
5 INC_PR = "r1"
6 BBCLASSEXTEND = "native"
8 SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
10 inherit autotools gettext
12 # We only want rename for update-alternatives on the target
13 do_install_append_pn-tar () {
14         install -d ${D}${base_bindir}
15         mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN}
16         mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN}
19 pkg_postinst_${PN} () {
20         update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100
21         update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100
24 pkg_prerm_${PN} () {
25         update-alternatives --remove tar tar.${PN}
26         update-alternatives --remove rmt rmt.${PN}