git » ripgrep-all.git » main » tree

[main] / PKGBUILD

# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Chris Lane <aur at chrislane dot com>
# Contributor: phiresky <phireskyde+aur@gmail.com>
# Contributor: Julien Nicoulaud <julien DOT nicoulaud AT gmail DOT com>

pkgname=ripgrep-all
pkgver=0.10.10
pkgrel=1
pkgdesc="rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc."
arch=('x86_64' 'armv7h')
url='https://github.com/phiresky/ripgrep-all'
license=('AGPL3')
depends=('ripgrep' 'xz')
makedepends=('cargo')
#checkdepends=('pandoc' 'poppler')
optdepends=(
  'ffmpeg: for the ffmpeg adapter'
  'graphicsmagick: for the pdfpages adapter'
  'pandoc: for the pandoc adapter'
  'poppler: for the poppler adapter'
  'tesseract: for the tesseract adapter'
)
options=(!lto)
source=(
  "${pkgname}-${pkgver}.tar.gz::https://github.com/phiresky/ripgrep-all/archive/refs/tags/v${pkgver}.tar.gz"
)
b2sums=('5da2c6f324fc8050fd90ec9ff802203cae72f49dc431d14cb29a0db03efd086ad0dcce842fe7dc9236f291262dad07dfdeb33fe8448489b73d9e36e32a1eeb28')

prepare() {
  cd ripgrep-all-${pkgver}
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  cd ripgrep-all-${pkgver}
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release --all-features
}

#check() {
#  cd ripgrep-all-${pkgver}
#  export RUSTUP_TOOLCHAIN=stable
#  cargo test --frozen --all-features
#}

package() {
  cd ripgrep-all-${pkgver}
  install -Dm 755 target/release/rga "${pkgdir}"/usr/bin/rga
  install -Dm 755 target/release/rga-preproc "${pkgdir}"/usr/bin/rga-preproc
  install -Dm 755 target/release/rga-fzf "${pkgdir}"/usr/bin/rga-fzf
  install -Dm 755 target/release/rga-fzf-open "${pkgdir}"/usr/bin/rga-fzf-open
}