blob: ecea8c6d8ef72a90be2a7df6deff432f9f91ce16 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "GNU cpio is a program to manage archives of files"
2DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
3another. It handles a number of cpio formats as well as reading and writing tar files."
4HOMEPAGE = "http://www.gnu.org/software/cpio/"
5SECTION = "base"
6LICENSE = "GPLv3"
7LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
8
9SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
10 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
11 "
12
13SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
14SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88"
15
16inherit autotools gettext texinfo
17
18EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
19
20do_install () {
21 autotools_do_install
22 if [ "${base_bindir}" != "${bindir}" ]; then
23 install -d ${D}${base_bindir}/
24 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
25 rmdir ${D}${bindir}/
26 fi
27
28 # Avoid conflicts with the version from tar
29 mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8"
30}
31
32PACKAGES =+ "${PN}-rmt"
33
34FILES_${PN}-rmt = "${sbindir}/rmt*"
35
36inherit update-alternatives
37
38ALTERNATIVE_PRIORITY = "100"
39
40ALTERNATIVE_${PN} = "cpio"
41ALTERNATIVE_${PN}-rmt = "rmt"
42
43ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
44
45ALTERNATIVE_PRIORITY[rmt] = "50"
46ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
47
48BBCLASSEXTEND = "native"