ddgr-2.2.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. PYTHON_COMPAT=( python3_{8,9,10,11,12} )
  5. inherit bash-completion-r1 python-r1
  6. DESCRIPTION="A command line utility to search DuckDuckGo from the terminal"
  7. HOMEPAGE="https://github.com/jarun/ddgr"
  8. if [[ "${PV}" == *9999* ]]; then
  9. inherit git-r3
  10. EGIT_REPO_URI="https://github.com/jarun/${PN}.git"
  11. else
  12. SRC_URI="https://github.com/jarun/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  13. fi
  14. LICENSE="GPL-3"
  15. SLOT="0"
  16. KEYWORDS="~amd64"
  17. IUSE="bash-completion zsh-completion fish-completion"
  18. DOCS=( README.md CHANGELOG LICENSE )
  19. src_install() {
  20. exeinto "/usr/bin"
  21. doexe "${PN}"
  22. doman "${PN}.1"
  23. dodoc ${DOCS}
  24. if use bash-completion
  25. then
  26. newbashcomp auto-completion/bash/${PN}-completion.bash ${PN}
  27. fi
  28. if use zsh-completion
  29. then
  30. insinto /usr/share/zsh/site-functions/
  31. newins auto-completion/zsh/${PN} _${PN}
  32. fi
  33. if use fish-completion
  34. then
  35. insinto /usr/share/fish/vendor_completions.d/
  36. newins auto-completion/fish/${PN}.fish ${PN}.fish
  37. fi
  38. }