download: add mirror alias for Debian
authorDavid Bauer <mail@david-bauer.net>
Sat, 20 Feb 2021 20:17:26 +0000 (21:17 +0100)
committerDavid Bauer <mail@david-bauer.net>
Fri, 26 Feb 2021 19:41:00 +0000 (20:41 +0100)
Add an alias for Debian packages and download them from the Debian
mirror redirector.

Signed-off-by: David Bauer <mail@david-bauer.net>
include/download.mk
package/firmware/amd64-microcode/Makefile
package/firmware/intel-microcode/Makefile
package/system/ca-certificates/Makefile
scripts/download.pl
tools/fakeroot/Makefile
tools/mklibs/Makefile

index c69d84939c0e9e742fad119e41be3556a43d9e26..4bf055e611e9fee9b3d5298f2979869ff79b52fe 100644 (file)
@@ -27,7 +27,7 @@ define dl_method
 $(strip \
   $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
     $(if $(2),$(2), \
-      $(if $(filter @OPENWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+      $(if $(filter @OPENWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
         $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
           $(if $(filter svn://%,$(1)),svn, \
             $(if $(filter cvs://%,$(1)),cvs, \
index cf21aba569b5fd24ff50053dd462e3eff6b06a1f..e0051ab8c0b944f48edd6b53ff99a5b966ef1b38 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=20191218
 PKG_RELEASE:=1
 
 PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/
+PKG_SOURCE_URL:=@DEBIAN/pool/non-free/a/amd64-microcode/
 PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
index b3c3674f8787b9f4bfbe373acd9c47e66ab74a36..e8ae7bff5822679fc8c706c90d4a5ca306d961d8 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=20200616
 PKG_RELEASE:=1
 
 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/
+PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/
 PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
index 2b5f96b20638b3ffd24512ea045ba066f81d6079..46bd871ccb28a8d10d2787c356d7cd12c8018eca 100644 (file)
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 PKG_MAINTAINER:=
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
+PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates
 PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
 PKG_INSTALL:=1
 
index 772982d1f279398181d20e694d2db955514c64d5..a1d80e9b42ac5ad2db64e6a5a5c80b5a2a0f252a 100755 (executable)
@@ -196,6 +196,10 @@ foreach my $mirror (@ARGV) {
                }
        } elsif ($mirror =~ /^\@OPENWRT$/) {
                # use OpenWrt source server directly
+       } elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) {
+               push @mirrors, "https://ftp.debian.org/debian/$1";
+               push @mirrors, "https://mirror.leaseweb.com/debian/$1";
+               push @mirrors, "https://mirror.netcologne.de/debian/$1";
        } elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
                push @mirrors, "https://mirror.netcologne.de/apache.org/$1";
                push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1";
index e9daa4b6ad7b945f3b6d3731a39668dc9f5fab94..61bc27b90ec37326b7484ec099f1a6cb2a0a67c4 100644 (file)
@@ -9,7 +9,7 @@ PKG_VERSION:=1.25.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/f/fakeroot
+PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
 PKG_HASH:=8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
index 48b1eace40393bc83df7ef8453d4518d0b10f84c..7c9ffffbade5133c37fb72404c1c17ee92994b4a 100644 (file)
@@ -10,7 +10,7 @@ PKG_NAME:=mklibs
 PKG_VERSION:=0.1.44
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mklibs/
+PKG_SOURCE_URL:=@DEBIAN/pool/main/m/mklibs/
 PKG_HASH:=3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2
 
 HOST_FIXUP:=autoreconf