Guest User

Untitled

a guest
Dec 25th, 2024
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
  2. # Maintainer: Caleb Maclennan <[email protected]>
  3. # Contributor: schuay <[email protected]>
  4. # Contributor: Roman Zimbelmann <[email protected]>
  5.  
  6. pkgname=ranger-git
  7. pkgver=1.9.3.730.gbd9b37fa
  8. pkgrel=2
  9. pkgdesc='Simple, vim-like file manager'
  10. arch=('any')
  11. url='https://ranger.github.io'
  12. license=('GPL')
  13. depends=('python')
  14. optdepends=(
  15. 'atool: for previews of archives'
  16. 'elinks: for previews of html pages'
  17. 'ffmpegthumbnailer: for video previews'
  18. 'highlight: for syntax highlighting of code'
  19. 'imagemagick: auto-rotate image previews based on EXIF data'
  20. 'libcaca: for ASCII-art image previews'
  21. 'lynx: for previews of html pages'
  22. 'mediainfo: for viewing information about media files'
  23. 'odt2txt: for OpenDocument texts'
  24. 'perl-image-exiftool: for viewing information about media files'
  25. 'poppler: for pdf previews'
  26. 'python-chardet: in case of encoding detection problems'
  27. 'python-pillow: for in-terminal preview of images in Kitty'
  28. 'sudo: to use the "run as root"-feature'
  29. 'transmission-cli: for viewing bittorrent information'
  30. 'ueberzug: for previews of images'
  31. 'w3m: for previews of images and html pages')
  32. checkdepends=('python-pytest')
  33. makedepends=(python-{build,installer,wheel}
  34. python-setuptools
  35. python-pylint
  36. git)
  37. conflicts=('ranger')
  38. #source=(https://ranger.github.io/${pkgname}-${pkgver}.tar.gz{,.sig})
  39. source=("$pkgname::git+https://github.com/ranger/ranger")
  40. #sha512sums=('18cd1d66838a5f85176e6b7502521a7e449aaa0b12e97d62142d39f980c529c5b97a50f6fb8a65adb64612fa80450b1e13047327f7bcc005a494af4ab321e4d4'
  41. # 'SKIP')
  42. #validpgpkeys=('1E9B36EC051FF6F7FFC969A7F08CE1E200FB5CDF' # Roman Zimbelmann <[email protected]> (@hut)
  43. # '30193C49CB39CD27008246ADE5902A52B247B8DE' # Wojciech Siewierski <[email protected]>
  44. # '66FA95C0F1619BDA520A41F60D63346A5D15D055') # Toon Nolten <[email protected]> (@huterich)
  45. md5sums=('SKIP')
  46.  
  47. pkgver() {
  48. cd "$srcdir/$pkgname"
  49. git describe --always | sed -e 's|-|.|g' -e '1s|^.||'
  50. }
  51.  
  52. prepare() {
  53. # cd "${pkgname}-${pkgver}"
  54. cd "$srcdir/$pkgname"
  55. # fixes https://github.com/ranger/ranger/issues/1853
  56. # upsteam fix was never released:
  57. # https://github.com/ranger/ranger/commit/2241cac899536a94c032a58bb7f1bf921980687e
  58. sed -i 's/xdg-open -- /xdg-open /' "ranger/config/rifle.conf"
  59. }
  60.  
  61. build() {
  62. # cd ${pkgname}-${pkgver}
  63. cd "$srcdir/$pkgname"
  64. python -m build -wn
  65. }
  66.  
  67. check() {
  68. # cd ${pkgname}-${pkgver}
  69. cd "$srcdir/$pkgname"
  70. local _pyver=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
  71. export PYTHONPATH="$PWD/lib.linux-$CARCH-cpython-$_pyver"
  72. export TERM=linux
  73. pytest
  74. }
  75.  
  76. package() {
  77. # cd ${pkgname}-${pkgver}
  78. cd "$srcdir/$pkgname"
  79. python -m installer -d "$pkgdir" dist/*.whl
  80. }
  81.  
  82. # vim: ts=2 sw=2 et:
  83.  
Add Comment
Please, Sign In to add comment