PKGBUILD 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Maintainer (arch): Xyne <ac xunilhcra enyx, backwards>
  2. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  3. # Contributor: grizzlyuser <grizzlyuser@protonmail.com>
  4. pkgname=reflector
  5. pkgver=2023
  6. pkgrel=2
  7. pkgdesc='A Python 3 module and script to retrieve and filter the latest Pacman mirror list.'
  8. arch=(any)
  9. license=(GPL2)
  10. url="https://xyne.dev/projects/reflector"
  11. depends=(python)
  12. makedepends=(python-build python-installer python-setuptools python-wheel)
  13. optdepends=('rsync: rate rsync mirrors')
  14. backup=(etc/xdg/reflector/reflector.conf)
  15. source=(https://xyne.dev/projects/reflector/src/reflector-2023.tar.xz{,.sig})
  16. sha512sums=('11aec550c15080695525409f11eae6d4b545df8b37a8e0727de939eefec2b2fa6aa95c5c3500a6c8a940b6060cdaf2526430ed47e01a3c6f098e1b77189eb479'
  17. 'SKIP'
  18. '3ee387ccd1fbd36ce4b9499a602981cae2f30335671b6d27376b3c179e7108dd3ae21121e1a59310720e458dcd9e73d949603a5abc7e16b5c6ab8e5b9b6dc625')
  19. b2sums=('24ee3610eb94e4412bceba40f4763def380028683358cb1016546a4d0bb12eaa69aba4e83b7998ebb74ee6f025f9f342901d076e44302da47d0ed14b727fb9c1'
  20. 'SKIP'
  21. 'dcb6d5f38b13b1b7bd783cc3f43bb6f4663dd7d88c693588c68583fed9e6ba375810caa819e84defb68c6c1249efcb5ab4f0eeb5d14168fffc3230af9f0a65a9')
  22. validpgpkeys=('D89FAAEB4CECAFD199A2F5E612C6F735F7A9A519') # "Xyne. (Replaces EC3CBE7F607D11E663149E811D1F0DC78F173680.) <xyne@archlinux.org>"
  23. build() {
  24. cd $pkgname-$pkgver
  25. python -m build --wheel --no-isolation
  26. }
  27. package ()
  28. {
  29. # Parabola: pin the python version
  30. _python_version=$(pacman -S --print-format='%v' python|cut -d- -f1|cut -d. -f1,2)
  31. depends+=("python>=${_python_version}" "python<${_python_version%.*}.$(( ${_python_version##*.} + 1 ))")
  32. cd $pkgname-$pkgver
  33. python -m installer --destdir="$pkgdir" dist/*.whl
  34. install -Dm644 "man/${pkgname}.1.gz" "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"
  35. install -Dm644 'reflector.service' "$pkgdir/usr/lib/systemd/system/reflector.service"
  36. install -Dm644 'reflector.timer' "$pkgdir/usr/lib/systemd/system/reflector.timer"
  37. install -Dm644 'reflector.conf' "$pkgdir/etc/xdg/reflector/reflector.conf"
  38. }
  39. # vim: set ts=2 sw=2 et:
  40. # Parabola: rebranding
  41. pkgrel+=.parabola1
  42. source+=(9001-branding.patch)
  43. prepare ()
  44. {
  45. cd $pkgname-$pkgver
  46. gunzip "man/${pkgname}.1.gz"
  47. patch -Np1 -i ../9001-branding.patch
  48. gzip "man/${pkgname}.1"
  49. }