summaryrefslogtreecommitdiff
path: root/pacman-mirrorlist/PKGBUILD
blob: 496466b0735370a2dc9593645763999f2bb1b6c8 (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
# $Id$
# Contributor: Dan McGee <dan@archlinux.org>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=pacman-mirrorlist
pkgver=20160424
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/core/os/$(uname -m)/${pkgname}-${pkgver}-${pkgrel}-any.pkg.tar.xz")

package() {
  mkdir -p $pkgdir/etc/pacman.d
  tar -xJf ${pkgname}-${pkgver}-${pkgrel}-any-original.tar.xz
  cat etc/pacman.d/mirrorlist | \
    (
      while read s
      do
        echo "${s}"
        if [ -z "${s}" ]
        then
          echo 'Server = https://arch.eckner.net/$repo/os/$arch'
          echo ''
          break
        fi
      done
      cat
    ) \
    > mirrorlist
  install -m644 mirrorlist $pkgdir/etc/pacman.d/
}

sha512sums=('95fee39449eb4d952bf5cb20c58f1a064dcab5c9da0fef14a2add764d0bf6bc0603908582f91d57d740be7621c584b267b6848b3fea1cf4d7a83e52880f17df2')