-ifneq ($(strip $(PKG_CAT)),)
- ifeq ($(PKG_CAT),unzip)
- UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE)
- else
- UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) -
- endif
+STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),)))
+STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured
+STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
+STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed
+
+override MAKEFLAGS=
+
+include $(INCLUDE_DIR)/download.mk
+include $(INCLUDE_DIR)/quilt.mk
+
+Build/Patch:=$(Build/Patch/Default)
+ifneq ($(strip $(PKG_UNPACK)),)