[trunk] 'ripgrep-13.0.0-2' modify

master
Nathan Owens 8 months ago
parent aee1837b1f
commit fe483d3d1d
  1. 44
      trunk/PKGBUILD

@ -0,0 +1,44 @@
# 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"
}
Loading…
Cancel
Save