From deb5962250ac469f915172aade010da1d8bce250 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 17 Jan 2016 10:47:32 +0000 Subject: [PATCH 1/2] CC: build: add @APACHE download facility The Apache Software Foundation offers diverse download mirros. For packaging Apache software a new alias @APACHE is defined. Signed-off-by: Heinrich Schuchardt git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48270 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/download.mk | 2 +- scripts/download.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/download.mk b/include/download.mk index e518cce4b2..562a7b9982 100644 --- a/include/download.mk +++ b/include/download.mk @@ -13,7 +13,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @APACHE/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/scripts/download.pl b/scripts/download.pl index 111d03c633..b0054dd51e 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -158,6 +158,12 @@ foreach my $mirror (@ARGV) { for (1 .. 5) { push @mirrors, "http://downloads.sourceforge.net/$1"; } + } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { + push @mirrors, "http://ftp.tudelft.nl/apache/$1"; + push @mirrors, "http://apache.openmirror.de/$1"; + push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1"; + push @mirrors, "http://mirror.cc.columbia.edu/pub/software/apache/$1"; + push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1"; } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "http://ftpmirror.gnu.org/$1"; push @mirrors, "http://ftp.gnu.org/pub/gnu/$1"; From f2ac199cf5393b2d16b1aea856a2fbfb523359fa Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 9 Apr 2016 10:25:34 +0000 Subject: [PATCH 2/2] CC: download: add @GITHUB download facility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Álvaro Fernández Rojas git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49138 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/download.mk | 2 +- scripts/download.pl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/download.mk b/include/download.mk index 562a7b9982..a7b7617afe 100644 --- a/include/download.mk +++ b/include/download.mk @@ -13,7 +13,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @APACHE/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/scripts/download.pl b/scripts/download.pl index b0054dd51e..1a2ff459d8 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -164,6 +164,11 @@ foreach my $mirror (@ARGV) { push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1"; push @mirrors, "http://mirror.cc.columbia.edu/pub/software/apache/$1"; push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1"; + } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) { + # give github a few more tries (different mirrors) + for (1 .. 5) { + push @mirrors, "https://raw.githubusercontent.com/$1"; + } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "http://ftpmirror.gnu.org/$1"; push @mirrors, "http://ftp.gnu.org/pub/gnu/$1";