summaryrefslogtreecommitdiff
path: root/libre/pacman-mirrorlist/PKGBUILD
blob: 7ce69f87328884beb6c81e2a7ce6160df1cca992 (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
# Maintainer (Arch): Florian Pritz <bluewind@xinu.at>
# Contributor (Arch): Dan McGee <dan@archlinux.org>
# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Esteban Carnevale <alfplayer@mailoo.org>


pkgname=pacman-mirrorlist
pkgver=20201002
pkgrel=1.parabola2
pkgdesc="Parabola GNU/Linux-libre mirror list for use by pacman"
arch=('any')
url="https://repo.parabola.nu/mirrorlist.txt"
license=('GPL')

backup=(etc/pacman.d/mirrorlist)
source=(mirrorlist-${pkgver}.txt::${url})

sha256sums=('6b6e170d0d2bdd3fc9f45ca3f0c42f52f44b8cfa33eabf4b69d6facf6fc280fe')

pkgver()
{
  LC_ALL=C date -u +%Y%m%d
}

prepare()
{
  local dt=$(LC_ALL=C date -u +%Y-%m-%d)

  sed -i "s|Last Updated: .*|Last Updated: ${dt}|" "${srcdir}"/mirrorlist-${pkgver}.txt
}

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