Username: Password: Remember me
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Andrew Gallant <jamslam@gmail.com>
pkgname=ripgrep
pkgver=0.10.0
pkgrel=1
pkgdesc="A search tool that combines the usability of ag with the raw speed of grep"
arch=('x86_64')
url="https://github.com/BurntSushi/ripgrep"
license=('MIT' 'custom')
depends=('gcc-libs' 'pcre2')
makedepends=('cargo' 'asciidoc')
source=("$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('bc193d269131823076fdb857f69a95c165e88848896379039218139136028e3705e09f1b9be33903e060c8cc37ad5b992ea70a05f6f01c6210bef535a35570c0')
 
build() {
  cd "$pkgname-$pkgver"
 
  cargo build --release --features 'pcre2'
}
 
package() {
  cd "$pkgname-$pkgver"
 
  install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
 
  install -Dm644 "complete/_rg" "$pkgdir/usr/share/zsh/site-functions/_rg"
  install -Dm644 "target/release/build/ripgrep-"*/out/rg.bash "$pkgdir/usr/share/bash-completion/completions/rg"
  install -Dm644 "target/release/build/ripgrep-"*/out/rg.fish "$pkgdir/usr/share/fish/completions/rg.fish"
 
  install -Dm644 "target/release/build/ripgrep-"*/out/rg.1 "$pkgdir/usr/share/man/man1/rg.1"
  install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md"
 
  install -Dm644 "COPYING" "$pkgdir/usr/share/licenses/${pkgname}/COPYING"
  install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT"
  install -Dm644 "UNLICENSE" "$pkgdir/usr/share/licenses/${pkgname}/UNLICENSE"
}