$(BUILD_DIR)/%/.stamp_extracted:
@$(call MESSAGE,"Extracting")
$(Q)mkdir -p $(@D)
- $(Q)$(if $($(PKG)_SOURCE),$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -)
+ $($(PKG)_EXTRACT_CMDS)
# some packages have messed up permissions inside
$(Q)chmod -R +rw $(@D)
$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned
$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned
+# default extract command
+$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
+
# post-steps hooks
$(2)_POST_EXTRACT_HOOKS ?=
$(2)_POST_PATCH_HOOKS ?=