PKGBUILD 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Maintainer (arch): Florian Pritz <bluewind@xinu.at>
  2. # Contributor (arch): Dan McGee <dan@archlinux.org>
  3. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  4. # Contributor: André Silva <emulatorman@hyperbola.info>
  5. # Contributor: Esteban Carnevale <alfplayer@mailoo.org>
  6. # Note: building and publishing this package is a bit delicate
  7. # 1: modify 'mirrorlist.txt' on the repo server
  8. # 2: `makepkg -g` (to get the new checksum)
  9. # 3: put the new checksum in 'sha256sums'
  10. # 4: if this PKGBUILD was modified for another reason, set 'pkgver' to YYYYMMDD
  11. # 5: `sudo libremakepkg && librestage && librerelease` (to publish the new package)
  12. pkgname=pacman-mirrorlist
  13. pkgver=20210803
  14. pkgrel=1.parabola1
  15. pkgdesc="Parabola GNU/Linux-libre mirror list for use by pacman"
  16. arch=('any')
  17. url="https://www.parabola.nu/"
  18. license=('GPL')
  19. backup=(etc/pacman.d/mirrorlist)
  20. source=(mirrorlist-${pkgver}.txt::https://repo.parabola.nu/mirrorlist.txt)
  21. sha256sums=('5cd5b901c094459945c21e0ee9be473d1224162fd2ed31469cf452485cba89e0')
  22. pkgver()
  23. {
  24. LC_ALL=C date -u +%Y%m%d
  25. }
  26. prepare()
  27. {
  28. local dt=$( LC_ALL=C date -u +%Y-%m-%d )
  29. sed -i "s|\(Last Updated: \).*|\1${dt}|" "${srcdir}"/mirrorlist-${pkgver}.txt
  30. }
  31. package()
  32. {
  33. mkdir -p "${pkgdir}"/etc/pacman.d
  34. install -m644 "${srcdir}"/mirrorlist-${pkgver}.txt "${pkgdir}"/etc/pacman.d/mirrorlist
  35. }