1 ext
=$(word $(words $(subst .
, ,$(1))),$(subst .
, ,$(1)))
3 # unpacking files with +s may break on some platforms. this typically emits error code 2
4 ifneq ($(HOST_OS
),Linux
)
5 HOST_TAR
:=trapret
2 $(TAR
)
9 TAR_CMD
:=$(HOST_TAR
) -C
$(PKG_BUILD_DIR
)/..
$(TAR_OPTIONS
)
10 UNZIP_CMD
:=unzip
-d
$(PKG_BUILD_DIR
)/..
$(DL_DIR
)/$(PKG_SOURCE
)
15 ifeq ($(strip $(PKG_UNPACK
)),)
16 ifeq ($(strip $(PKG_CAT
)),)
17 # try to autodetect file type
18 EXT
:=$(call ext
,$(PKG_SOURCE
))
21 ifeq ($(filter gz tgz
,$(EXT
)),$(EXT
))
22 EXT
:=$(call ext
,$(PKG_SOURCE
:.
$(EXT
)=))
23 UNPACK
:=gzip
-dc
$(DL_DIR
)/$(PKG_SOURCE
) |
25 ifeq ($(filter bzip2 bz2 bz tbz2 tbz
,$(EXT
)),$(EXT
))
26 EXT
:=$(call ext
,$(PKG_SOURCE
:.
$(EXT
)=))
27 UNPACK
:=bzcat
$(DL_DIR
)/$(PKG_SOURCE
) |
29 ifeq ($(filter tgz tbz tbz2
,$(EXT1
)),$(EXT1
))
32 UNPACK ?
= cat
$(DL_DIR
)/$(PKG_SOURCE
) |
34 PKG_UNPACK
:=$(UNPACK
) $(TAR_CMD
)
37 PKG_UNPACK
:=$(UNPACK
) (cd
$(PKG_BUILD_DIR
)/..
; cpio
-i
-d
)
40 PKG_UNPACK
:=$(UNZIP_CMD
)
44 # compatibility code for packages that set PKG_CAT
45 ifeq ($(strip $(PKG_UNPACK
)),)
46 # use existing PKG_CAT
47 PKG_UNPACK
:=$(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
$(TAR_CMD
)
48 ifeq ($(PKG_CAT
),unzip
)
49 PKG_UNPACK
:=$(UNZIP_CMD
)
51 # replace zcat with $(ZCAT), because some system don't support it properly
52 ifeq ($(PKG_CAT
),zcat
)
53 PKG_UNPACK
:=gzip
-dc
$(DL_DIR
)/$(PKG_SOURCE
) |
$(TAR_CMD
)
56 ifneq ($(strip $(CRLF_WORKAROUND
)),)
57 PKG_UNPACK
+= && find
$(PKG_BUILD_DIR
) -type f
-print0 | xargs
-0 perl
-pi
-e
's!\r$$$$!!g'
This page took 0.042779 seconds and 5 git commands to generate.