Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "GNU file archiving program" |
| 2 | DESCRIPTION = "GNU tar saves many files together into a single tape \ |
| 3 | or disk archive, and can restore individual files from the archive." |
| 4 | HOMEPAGE = "http://www.gnu.org/software/tar/" |
| 5 | SECTION = "base" |
| 6 | |
| 7 | SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" |
| 8 | |
| 9 | inherit autotools gettext texinfo |
| 10 | |
| 11 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" |
| 12 | |
| 13 | # Let aclocal use the relative path for the m4 file rather than the |
| 14 | # absolute since tar has a lot of m4 files, otherwise there might |
| 15 | # be an "Argument list too long" error when it is built in a long/deep |
| 16 | # directory. |
| 17 | acpaths = "-I ./m4" |
| 18 | |
| 19 | do_install () { |
| 20 | autotools_do_install |
| 21 | ln -s tar ${D}${bindir}/gtar |
| 22 | } |
| 23 | |
| 24 | do_install_append_class-target() { |
| 25 | install -d ${D}${base_bindir} |
| 26 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar |
| 27 | mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar |
| 28 | rmdir ${D}${bindir}/ |
| 29 | } |
| 30 | |
| 31 | PACKAGES =+ "${PN}-rmt" |
| 32 | |
| 33 | FILES_${PN}-rmt = "${base_sbindir}/rmt*" |
| 34 | |
| 35 | inherit update-alternatives |
| 36 | |
| 37 | ALTERNATIVE_PRIORITY = "100" |
| 38 | |
| 39 | ALTERNATIVE_${PN} = "tar" |
| 40 | ALTERNATIVE_${PN}-rmt = "rmt" |
| 41 | ALTERNATIVE_${PN}_class-nativesdk = "" |
| 42 | ALTERNATIVE_${PN}-rmt_class-nativesdk = "" |
| 43 | |
| 44 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" |
| 45 | ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" |
| 46 | |
| 47 | PROVIDES_append_class-native = " tar-replacement-native" |
| 48 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" |
| 49 | |
| 50 | BBCLASSEXTEND = "native nativesdk" |