summaryrefslogtreecommitdiff
path: root/pacman-mirrorlist32/PKGBUILD
blob: 16ebffb65182dabb1a36c76efe9eb4e6ea3fa359 (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
38
# Maintainer: Erich Eckner <arch at eckner dot net>

# repo: releng

pkgname=pacman-mirrorlist32
pkgver=20200924
pkgrel=1
pkgdesc=$(printf '%s' 'Arch Linux mirror list for use by pacman for i68' '6 packages on an x86' '_64 host')
arch=('any')
url="https://www.archlinux32.org/"
license=('GPL')
backup=(etc/pacman.d/mirrorlist32)
source=(archlinux32-packages::git+ssh://gitolite@git.archlinux32.org/packages.git)
sha512sums=('SKIP')
makedepends=('git')

pkgver() {
  {
    git -C "$srcdir/archlinux32-packages" archive HEAD -- 'core/pacman-mirrorlist/PKGBUILD' | \
      tar -Ox | \
      grep '^pkgver=' || \
      {
        pacman -Ss '^pacman-mirrorlist$' | \
          sed -n '
            s,^core/pacman-mirrorlist ,,
            T
            s/-.*$//
            p
          '
      }
  } | \
    cut -d= -f2
}

package() {
  mkdir -p "$pkgdir/etc/pacman.d"
  install -m644 "$srcdir/archlinux32-packages/core/pacman-mirrorlist/mirrorlist" "$pkgdir/etc/pacman.d/mirrorlist32"
}