PKGBUILD 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Maintainer (arch): Florian Pritz <bluewind@xinu.at>
  2. # Contributor: 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. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  7. # Contributor: bill-auger <bill-auger@programmer.net>
  8. # NOTE: to build and publish this package properly:
  9. # * modify '/mirrorlist.txt' on the tier-0 repo server:
  10. # 1) update the list of mirrors
  11. # 2) update "Last Updated:" to the current date in the form: YYYY-MM-DD
  12. # * modify this PKGBUILD:
  13. # 1) set 'pkgver' to the same date, but in the form: YYYYMMDD
  14. # 2) update 'sha256sums' (`makepkg -g`, `sha256sums`, `upgpkg`, or equivalent)
  15. # This is necessary in order that the repo mirrorlist, the packaged mirrorlist,
  16. # and the $pkgver will all reflect the same date.
  17. pkgname=pacman-mirrorlist
  18. pkgver=20250305
  19. pkgrel=1.parabola1
  20. pkgdesc="Parabola GNU/Linux-libre mirror list for use by pacman"
  21. arch=(any)
  22. url=https://wiki.parabola.nu/Repositories
  23. license=(GPL)
  24. backup=(etc/pacman.d/mirrorlist)
  25. source=(mirrorlist-${pkgver}.txt::https://repo.parabola.nu/mirrorlist.txt)
  26. sha256sums=('ad9dd2fa74039066ab08549d0caa035e0ada202ee872660b1416384c82a8b707')
  27. prepare()
  28. {
  29. local dt="$(sed 's|.*Last Updated:||p ; /^/d ;' mirrorlist-${pkgver}.txt | tr -d ' -')"
  30. if [[ "${pkgver}" != "${dt}" ]]
  31. then echo "ERROR: \$pkgver: '${pkgver}' differs from the repo mirrorlist date: '${dt}'."
  32. echo " \$pkgver should be as the form: YYYYYMMDD."
  33. echo " The mirrorlist date may be as either of the forms: YYYYYMMDD or YYYYY-MM-DD."
  34. echo " Please change one of them such that the Ys, Ms, and Ds match."
  35. return 1
  36. fi
  37. }
  38. package()
  39. {
  40. install -Dm644 mirrorlist-${pkgver}.txt "${pkgdir}"/etc/pacman.d/mirrorlist
  41. }