aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/download.mk3
-rw-r--r--include/package.mk1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/download.mk b/include/download.mk
index 74986be598..f064ee9e8c 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -41,7 +41,7 @@ define DownloadMethod/default
endef
define wrap_mirror
- @$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "x" || ( $(1) )
+ $(if $(MIRROR),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "x" || ( $(1) ),$(1))
endef
define DownloadMethod/cvs
@@ -101,6 +101,7 @@ define Download/Defaults
PROTO:=
MD5SUM:=
SUBDIR:=
+ MIRROR:=1
VERSION:=
endef
diff --git a/include/package.mk b/include/package.mk
index da8de5cccf..8819a11564 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -49,6 +49,7 @@ define Download/default
URL:=$(PKG_SOURCE_URL)
SUBDIR:=$(PKG_SOURCE_SUBDIR)
PROTO:=$(PKG_SOURCE_PROTO)
+ $(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
VERSION:=$(PKG_SOURCE_VERSION)
MD5SUM:=$(PKG_MD5SUM)
endef