fix mistakes in unpack change
[openwrt/svn-archive/archive.git] / include / host-build.mk
index a1287da475bc8a63a5d13c021e6d27efc0fe39e9..0502d7682a5c9514cd4e10d84fbdccfbef7375f8 100644 (file)
@@ -6,15 +6,11 @@
 #
 
 include $(INCLUDE_DIR)/host.mk
+include $(INCLUDE_DIR)/unpack.mk
 
-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
+ifneq ($(strip $(PKG_UNPACK)),)
   define Build/Prepare/Default
-       $(UNPACK)
+       $(PKG_UNPACK)
        @if [ -d ./patches ]; then \
                $(PATCH) $(PKG_BUILD_DIR) ./patches; \
        fi