package: add generic support for lz archives
This commit teaches the generic package handling code how to extract .tar.lz archives. When lzip is not installed on the host, host-lzip gets built automatically. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
dc7fcbe494
commit
f165032e4f
@ -158,6 +158,13 @@ config BR2_XZCAT
|
|||||||
Command to be used to extract a xz'ed file to stdout.
|
Command to be used to extract a xz'ed file to stdout.
|
||||||
Default is "xzcat"
|
Default is "xzcat"
|
||||||
|
|
||||||
|
config BR2_LZCAT
|
||||||
|
string "lzcat command"
|
||||||
|
default "lzip -d -c"
|
||||||
|
help
|
||||||
|
Command to be used to extract a lzip'ed file to stdout.
|
||||||
|
Default is "lzip -d -c"
|
||||||
|
|
||||||
config BR2_TAR_OPTIONS
|
config BR2_TAR_OPTIONS
|
||||||
string "Tar options"
|
string "Tar options"
|
||||||
default ""
|
default ""
|
||||||
|
1
Makefile
1
Makefile
@ -432,6 +432,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
|
|||||||
ZCAT := $(call qstrip,$(BR2_ZCAT))
|
ZCAT := $(call qstrip,$(BR2_ZCAT))
|
||||||
BZCAT := $(call qstrip,$(BR2_BZCAT))
|
BZCAT := $(call qstrip,$(BR2_BZCAT))
|
||||||
XZCAT := $(call qstrip,$(BR2_XZCAT))
|
XZCAT := $(call qstrip,$(BR2_XZCAT))
|
||||||
|
LZCAT := $(call qstrip,$(BR2_LZCAT))
|
||||||
TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
|
TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
|
||||||
|
|
||||||
# packages compiled for the host go here
|
# packages compiled for the host go here
|
||||||
|
@ -36,6 +36,7 @@ pkgname = $(lastword $(subst /, ,$(pkgdir)))
|
|||||||
# Define extractors for different archive suffixes
|
# Define extractors for different archive suffixes
|
||||||
INFLATE.bz2 = $(BZCAT)
|
INFLATE.bz2 = $(BZCAT)
|
||||||
INFLATE.gz = $(ZCAT)
|
INFLATE.gz = $(ZCAT)
|
||||||
|
INFLATE.lz = $(LZCAT)
|
||||||
INFLATE.lzma = $(XZCAT)
|
INFLATE.lzma = $(XZCAT)
|
||||||
INFLATE.tbz = $(BZCAT)
|
INFLATE.tbz = $(BZCAT)
|
||||||
INFLATE.tbz2 = $(BZCAT)
|
INFLATE.tbz2 = $(BZCAT)
|
||||||
|
5
support/dependencies/check-host-lzip.mk
Normal file
5
support/dependencies/check-host-lzip.mk
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ifeq (,$(call suitable-host-package,lzip,$(LZCAT)))
|
||||||
|
DEPENDENCIES_HOST_PREREQ += host-lzip
|
||||||
|
EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS += .lz
|
||||||
|
LZCAT = $(HOST_DIR)/usr/bin/lzip -d -c
|
||||||
|
endif
|
14
support/dependencies/check-host-lzip.sh
Executable file
14
support/dependencies/check-host-lzip.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
candidate="$1"
|
||||||
|
|
||||||
|
lzip=`which $candidate 2>/dev/null`
|
||||||
|
if [ ! -x "$lzip" ]; then
|
||||||
|
lzip=`which lzip 2>/dev/null`
|
||||||
|
if [ ! -x "$lzip" ]; then
|
||||||
|
# echo nothing: no suitable lzip found
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $lzip
|
Loading…
Reference in New Issue
Block a user