ripgrep-0.4.0.ebuild 886 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="a command line search tool that combines usability with raw speed"
  5. HOMEPAGE="https://github.com/BurntSushi/ripgrep"
  6. #SRC_URI="https://github.com/BurntSushi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  7. # custom tarball bundling all deps and index, otherwise cargo fetches from the network
  8. SRC_URI="http://dev.gentoo.org/~radhermit/dist/${P}.tar.xz"
  9. LICENSE="|| ( MIT Unlicense )"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. DEPEND="
  13. dev-util/cargo
  14. >=dev-lang/rust-1.11
  15. "
  16. src_prepare() {
  17. default
  18. # move cache dir where cargo expects it
  19. mv .cargo "${HOME}" || die
  20. }
  21. src_compile() {
  22. cargo build --release --verbose || die
  23. }
  24. src_test() {
  25. cargo test || die "tests failed"
  26. }
  27. src_install() {
  28. dobin target/release/rg
  29. doman doc/rg.1
  30. dodoc CHANGELOG.md README.md
  31. }