You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.7 KiB
45 lines
1.7 KiB
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
|
|
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
|
|
# Contributor: Andrew Gallant <jamslam@gmail.com>
|
|
pkgname=ripgrep
|
|
pkgver=13.0.0
|
|
pkgrel=2
|
|
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' 'asciidoctor' 'jq')
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz")
|
|
sha512sums=('9321532e4bf633ecd200d98873b6773230d046d7bd075f223f09a68531cef4e4138f01c6b41e0f8697805963ae7e0d44d542c6d94025d9a06fbbef3562c17734')
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
cargo build --release --locked --features 'pcre2' --message-format=json-render-diagnostics |
|
|
jq -r 'select(.out_dir) | select(.package_id | startswith("ripgrep ")) | .out_dir' > out_dir
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
cargo test --release --locked --features 'pcre2'
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
local OUT_DIR=$(<out_dir)
|
|
|
|
install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
|
|
|
|
install -Dm644 "complete/_rg" "$pkgdir/usr/share/zsh/site-functions/_rg"
|
|
install -Dm644 "$OUT_DIR"/rg.bash "$pkgdir/usr/share/bash-completion/completions/rg"
|
|
install -Dm644 "$OUT_DIR"/rg.fish "$pkgdir/usr/share/fish/vendor_completions.d/rg.fish"
|
|
install -Dm644 "$OUT_DIR"/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"
|
|
}
|