-$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
- mkdir -p $(TOOL_BUILD_DIR)
- $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+IPKG_LIBPCAP:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+IDIR_LIBPCAP:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
+INFO_LIBPCAP:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
+
+$(DL_DIR)/$(PKG_SOURCE):
+ $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
+
+$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+ mkdir -p $(BUILD_DIR)/$(PKG_NAME)
+ $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR)/$(PKG_NAME) $(TAR_OPTIONS) -