# Contributor: Matt Smith # Maintainer: Natanael Copa pkgname=alpine-mirrors pkgver=3.5.0 pkgrel=0 pkgdesc="List of Alpine Linux Mirrors" url="http://alpinelinux.org/" arch="noarch" license="MIT" depends="" makedepends="curl" install="" subpackages="" source="mirrors.yaml" build() { cd "$srcdir" awk '$1 == "-" && $2 ~ /^http:/ {print $2}' mirrors.yaml > MIRRORS.txt } check() { cd "$srcdir" local failed="" for i in $(cat MIRRORS.txt); do msg "testing $i" curl --head --connect-timeout 10 $i >/dev/null \ || failed="$failed $i" done if [ -n "$failed" ]; then error "Following mirrors failed:" for i in $failed; do echo $i done return 1 fi } 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 } sha512sums="0c1ddfd4f0375ffe155495b71f8f61b7692fc04c3dd554ff2ee55f6ea5478a50aa377331027665748dd106d2ea29a1dd48934d01c8b0f81d73a524510c3981ae mirrors.yaml"