diff options
-rw-r--r-- | main/alpine-mirrors/APKBUILD | 20 | ||||
-rw-r--r-- | main/alpine-mirrors/gen-txt.lua | 12 | ||||
-rw-r--r-- | main/alpine-mirrors/mir.lua | 10 | ||||
-rw-r--r-- | main/alpine-mirrors/mirrors.yaml | 34 |
4 files changed, 69 insertions, 7 deletions
diff --git a/main/alpine-mirrors/APKBUILD b/main/alpine-mirrors/APKBUILD index 034f4d3aca..6f1c7186e6 100644 --- a/main/alpine-mirrors/APKBUILD +++ b/main/alpine-mirrors/APKBUILD @@ -2,26 +2,32 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=alpine-mirrors pkgver=2.6 -pkgrel=0 +pkgrel=1 pkgdesc="List of Alpine Linux Mirrors" url="http://alpinelinux.org/" arch="noarch" license="GPL" depends="" -makedepends="" +makedepends="lua lua-yaml" install="" subpackages="" -source="MIRRORS.txt" +source="mirrors.yaml gen-txt.lua" build() { - return 0 + cd "$srcdir" + lua gen-txt.lua < mirrors.yaml > MIRRORS.txt } package() { + install -D -m644 "$srcdir"/mirrors.yaml \ + "$pkgdir"/usr/share/alpine-mirrors/mirrors.yaml || return 1 install -D -m644 "$srcdir"/MIRRORS.txt \ "$pkgdir"/usr/share/alpine-mirrors/MIRRORS.txt || return 1 } -md5sums="cf39a31274feb2510f08f0f61adbada2 MIRRORS.txt" -sha256sums="70a19d57dddbd16d6fc44e7d4e29a57e9fb94f27563912a19cbd62ba4d258b91 MIRRORS.txt" -sha512sums="a9e9a94dfbaa93caed31d2ef74050a50dfe4c3b285cf3a2f8695bf3cea1854be19387fb1eff5748848db732e8de09879bcb4156a370c98ee6f1a9e05e737be1c MIRRORS.txt" +md5sums="bad66f72a943643d8ffc8e44fbd71b35 mirrors.yaml +4a3bfe9df4343fb44759a5049fa4bfc6 gen-txt.lua" +sha256sums="3c47c7a35cad80e221fbafa5bc649e9c25b349d161909d02ae78e33e55c1c807 mirrors.yaml +87ede8d9104dcef9cbe3f53282a0bc5820bf44a1adcdfbf109e2d4b0385980be gen-txt.lua" +sha512sums="ce93b4267b5d36cd0a64d35f8af2a1991dbc321fa346ab9702e35b5961e8deb346587735d09e2d91d1067043acda0596e270bb665555459f52149d5fa39c59d0 mirrors.yaml +91d51ad685d5cd02670b7f1575698fc3b3309cc52b3318ffcf252a64767b8087c85a10c3461a46272b542850bd7e33f504fbdb42ac2e1f001af837a2dd0179f7 gen-txt.lua" diff --git a/main/alpine-mirrors/gen-txt.lua b/main/alpine-mirrors/gen-txt.lua new file mode 100644 index 0000000000..cfda91fa8e --- /dev/null +++ b/main/alpine-mirrors/gen-txt.lua @@ -0,0 +1,12 @@ +#!/usr/bin/lua + +yaml = require('yaml') + +data = yaml.load(io.stdin:read("*all")) +for _,m in pairs(data) do + for _,url in pairs(m.urls) do + if (url):match("^http://") then + print(url) + end + end +end diff --git a/main/alpine-mirrors/mir.lua b/main/alpine-mirrors/mir.lua new file mode 100644 index 0000000000..2bd8175d05 --- /dev/null +++ b/main/alpine-mirrors/mir.lua @@ -0,0 +1,10 @@ +yaml=require'yaml' + +list={} +for line in io.stdin:lines() do + local m = {} + m.name=string.match(line, "http://([^/]+)") + m.urls = { line } + table.insert(list, m) +end +print(yaml.dump(list)) diff --git a/main/alpine-mirrors/mirrors.yaml b/main/alpine-mirrors/mirrors.yaml new file mode 100644 index 0000000000..7214cf37c9 --- /dev/null +++ b/main/alpine-mirrors/mirrors.yaml @@ -0,0 +1,34 @@ +--- +- name: nl.alpinelinux.org + location: Europe, Netherlands + bandwidth: 100 Mbits/s + urls: + - http://nl.alpinelinux.org/alpine/ +- name: dl-2.alpinelinux.org + urls: + - http://dl-2.alpinelinux.org/alpine/ +- name: dl-3.alpinelinux.org + urls: + - http://dl-3.alpinelinux.org/alpine/ +- name: dl-4.alpinelinux.org + urls: + - http://dl-4.alpinelinux.org/alpine/ +- name: dl-5.alpinelinux.org + urls: + - http://dl-5.alpinelinux.org/alpine/ +- name: distrib-coffee.ipsl.jussieu.fr + urls: + - http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/ +- name: mirror.yandex.ru + urls: + - http://mirror.yandex.ru/mirrors/alpine/ +- name: mirrors.gigenet.com + urls: + - http://mirrors.gigenet.com/alpinelinux/ +- name: repos.lax-noc.com + urls: + - http://repos.lax-noc.com/alpine/ +- name: mirror1.hs-esslingen.de + urls: + - http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/ + |