papis-0.13-r1.ebuild 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. DISTUTILS_USE_PEP517=setuptools
  5. PYTHON_COMPAT=( python3_{10..12} )
  6. inherit bash-completion-r1 distutils-r1
  7. DESCRIPTION="A powerful and highly extensible CLI document and bibliography manager"
  8. HOMEPAGE="https://github.com/papis/papis/ https://pypi.org/project/papis/"
  9. SRC_URI="https://github.com/papis/papis/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~amd64"
  13. IUSE="bash-completion zsh-completion fish-completion rofi"
  14. RDEPEND="
  15. >=dev-python/pyaml-3.12[${PYTHON_USEDEP}]
  16. >=dev-python/arxiv2bib-1.0.0[${PYTHON_USEDEP}]
  17. >=dev-python/beautifulsoup4-4.4.1[${PYTHON_USEDEP}]
  18. >=dev-python/bibtexparser-1.4[${PYTHON_USEDEP}]
  19. <dev-python/bibtexparser-2[${PYTHON_USEDEP}]
  20. >=dev-python/chardet-3.0.2[${PYTHON_USEDEP}]
  21. >=dev-python/click-7.0.0[${PYTHON_USEDEP}]
  22. >=dev-python/colorama-0.2[${PYTHON_USEDEP}]
  23. dev-python/dominate[${PYTHON_USEDEP}]
  24. >=dev-python/filetype-1.0.1[${PYTHON_USEDEP}]
  25. >=dev-python/habanero-0.6.0[${PYTHON_USEDEP}]
  26. >=dev-python/isbnlib-3.9.1[${PYTHON_USEDEP}]
  27. >=dev-python/lxml-4.3.5[${PYTHON_USEDEP}]
  28. >=dev-python/prompt-toolkit-3.0.0[${PYTHON_USEDEP}]
  29. >=dev-python/pygments-2.2.0[${PYTHON_USEDEP}]
  30. >=dev-python/pyparsing-2.2.0[${PYTHON_USEDEP}]
  31. >=dev-python/python-doi-0.1.1[${PYTHON_USEDEP}]
  32. >=dev-python/python-slugify-1.2.6[${PYTHON_USEDEP}]
  33. >=dev-python/requests-2.11.1[${PYTHON_USEDEP}]
  34. >=dev-python/stevedore-1.30[${PYTHON_USEDEP}]
  35. >=dev-python/tqdm-4.1[${PYTHON_USEDEP}]
  36. >=dev-python/typing-extensions-3.7[${PYTHON_USEDEP}]
  37. rofi? (
  38. x11-misc/rofi
  39. dev-python/papis-rofi[${PYTHON_USEDEP}]
  40. )
  41. "
  42. DOCS=( AUTHORS CONTRIBUTING.md CHANGELOG.md CODE_OF_CONDUCT.md HACKING.md INSTALL LICENSE doc/ )
  43. distutils_enable_tests pytest
  44. src_install() {
  45. distutils-r1_src_install
  46. dodoc -r ${DOCS}
  47. if use bash-completion
  48. then
  49. #FIXME: QA says:
  50. #
  51. #* QA Notice: The ebuild is installing to one or more unexpected paths:
  52. #*
  53. #* /usr/share/doc/papis
  54. #*
  55. #* Please fix the ebuild to use correct FHS/Gentoo policy paths.
  56. newbashcomp scripts/shell_completion/click/bash/${PN}.bash ${PN}
  57. fi
  58. if use zsh-completion
  59. then
  60. insinto /usr/share/zsh/site-functions/
  61. newins scripts/shell_completion/click/_${PN} _${PN}
  62. fi
  63. if use fish-completion
  64. then
  65. insinto /usr/share/fish/vendor_completions.d/
  66. newins scripts/shell_completion/click/fish/${PN}.fish ${PN}.fish
  67. fi
  68. }
  69. #FIXME:
  70. # * Problems with installed bash completions were found:
  71. # *
  72. # * papis.bash: incorrect name, no completions for 'papis.bash' command defined.
  73. # *
  74. # * For more details on installing bash-completions, please see:
  75. # * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files
  76. #should disappear when the ebuild will be fixed
  77. pkg_postinst() {
  78. #why does it create /usr/share/doc/papis/ in addition to /usr/share/doc/papis-0.13/?
  79. rm -r /usr/share/doc/papis/
  80. }