X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=include%2Fdownload.mk;h=1c3f23e94ba552aa2297ac3c1f5165152c98bf3c;hp=a2238bce599ddc8d9b9d6c8b6ec973cd64620e0a;hb=a95d8b6513e63551337948b294e72d8cda35cc5e;hpb=a12502b0cf9b784abd3930c95057b08373da21c5 diff --git a/include/download.mk b/include/download.mk index a2238bce59..1c3f23e94b 100644 --- a/include/download.mk +++ b/include/download.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,7 +11,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% ftp://% http://% file://%,$(1)),default, \ + $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ @@ -29,8 +29,8 @@ $(strip \ endef # code for creating tarballs from cvs/svn/git/bzr/hg/darcs checkouts - useful for mirror support -dl_pack/bz2=$(TAR) cfj $(1) $(2) -dl_pack/gz=$(TAR) cfz $(1) $(2) +dl_pack/bz2=$(TAR) cjf $(1) $(2) +dl_pack/gz=$(TAR) czf $(1) $(2) dl_pack/unknown=echo "ERROR: Unknown pack format for file $(1)"; false define dl_pack $(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown)) @@ -41,11 +41,11 @@ define DownloadMethod/unknown endef define DownloadMethod/default - $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" $(URL) + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" $(foreach url,$(URL),"$(url)") endef define wrap_mirror - $(if $(MIRROR),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "x" || ( $(1) ),$(1)) + $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" || ( $(1) ),$(1)) endef define DownloadMethod/cvs @@ -87,8 +87,8 @@ define DownloadMethod/git cd $(TMP_DIR)/dl && \ rm -rf $(SUBDIR) && \ [ \! -d $(SUBDIR) ] && \ - git clone $(URL) $(SUBDIR) && \ - (cd $(SUBDIR) && git checkout $(VERSION)) && \ + git clone $(URL) $(SUBDIR) --recursive && \ + (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \ echo "Packing checkout..." && \ rm -rf $(SUBDIR)/.git && \ $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \ @@ -158,6 +158,7 @@ define Download/Defaults MD5SUM:= SUBDIR:= MIRROR:=1 + MIRROR_MD5SUM:=x VERSION:= endef