pigz: Add update-alternatives support since this otherwise conflicts with busybox/gzip

(From OE-Core rev: 8903327ff483cd3dbde8cf692be2092462265188)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2012-03-21 14:29:49 +00:00
parent 7bbb8930d5
commit d95f6d0e32
2 changed files with 15 additions and 4 deletions

View File

@ -15,7 +15,18 @@ PROVIDES_virtclass-native += "gzip-native"
DEPENDS = "zlib"
do_install () {
install -d ${D}${bindir}
install ${B}/pigz ${D}${bindir}/gzip
install ${B}/unpigz ${D}${bindir}/gunzip
if [ "${PN}" = "${BPN}" ] ; then
# Install files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
install ${B}/pigz ${D}${base_bindir}/gzip
install ${B}/unpigz ${D}${base_bindir}/gunzip
else
install -d ${D}${bindir}
install ${B}/pigz ${D}${bindir}/gzip
install ${B}/unpigz ${D}${bindir}/gunzip
fi
}
ALTERNATIVE_LINKS = "${base_bindir}/gzip ${base_bindir}/gunzip"
ALTERNATIVE_PRIORITY = "80"

View File

@ -1,6 +1,6 @@
require pigz.inc
PR = "r1"
PR = "r2"
NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"