summaryrefslogtreecommitdiff
path: root/pacman-mirrorlist/PKGBUILD
blob: 40f7d10a605656c80f8b4ee5e9b5dc1d3229fdcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $Id$
# Contributor: Dan McGee <dan@archlinux.org>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=pacman-mirrorlist
pkgver=20180203
pkgrel=1
pkgdesc="Arch Linux mirror list for use by pacman"
arch=('any')
url="https://www.archlinux.org/mirrorlist/"
license=('GPL')
backup=(etc/pacman.d/mirrorlist)
source=("${pkgname}-${pkgver}-${pkgrel%%.*}-any-original.tar.xz::https://arch.eckner.net/merged/core/os/$(uname -m)/${pkgname}-${pkgver}-${pkgrel%%.*}-any.pkg.tar.xz")
sha512sums=('0ba24e6bcb2f54e9614f9da1d1ae258e5feeb9f78969c54476c3e00121d29d9b5645b6b0bf59af48178c4aaf44145ba6705829ad3432ab62b5717e6f8f164f3f')

build() {
  {
    while read s
    do
      echo "${s}"
      if [ -z "${s}" ]
      then
        echo 'Server = https://arch.eckner.net/merged/$repo/os/$arch'
        echo ''
        break
      fi
    done
    cat
  } \
    < etc/pacman.d/mirrorlist \
    > mirrorlist
}

package() {
  mkdir -p $pkgdir/etc/pacman.d
  install -m644 mirrorlist $pkgdir/etc/pacman.d/
}