upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ripgrep / trunk / PKGBUILD
blob04dc4508b4259381016e2389019f29bc264facfe
1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2 # Maintainer: Maxim Baz <archlinux at maximbaz dot com>
3 # Contributor: Andrew Gallant <jamslam@gmail.com>
4 pkgname=ripgrep
5 pkgver=13.0.0
6 pkgrel=3
7 pkgdesc="A search tool that combines the usability of ag with the raw speed of grep"
8 arch=('x86_64')
9 url="https://github.com/BurntSushi/ripgrep"
10 license=('MIT' 'custom')
11 depends=('gcc-libs' 'pcre2')
12 makedepends=('cargo' 'asciidoctor')
13 source=("$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz")
14 sha512sums=('9321532e4bf633ecd200d98873b6773230d046d7bd075f223f09a68531cef4e4138f01c6b41e0f8697805963ae7e0d44d542c6d94025d9a06fbbef3562c17734')
16 build() {
17   cd "$pkgname-$pkgver"
19   cargo build --release --locked --features 'pcre2'
20   find target -name ripgrep-stamp -print0 | xargs -0 ls -t | head -n1 | xargs dirname > out_dir
23 check() {
24   cd "$pkgname-$pkgver"
26   cargo test --release --locked --features 'pcre2'
29 package() {
30   cd "$pkgname-$pkgver"
31   local OUT_DIR=$(<out_dir)
33   install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
35   install -Dm644 "complete/_rg" "$pkgdir/usr/share/zsh/site-functions/_rg"
36   install -Dm644 "$OUT_DIR"/rg.bash "$pkgdir/usr/share/bash-completion/completions/rg"
37   install -Dm644 "$OUT_DIR"/rg.fish "$pkgdir/usr/share/fish/vendor_completions.d/rg.fish"
38   install -Dm644 "$OUT_DIR"/rg.1 "$pkgdir/usr/share/man/man1/rg.1"
40   install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md"
41   install -Dm644 "COPYING" "$pkgdir/usr/share/licenses/${pkgname}/COPYING"
42   install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT"
43   install -Dm644 "UNLICENSE" "$pkgdir/usr/share/licenses/${pkgname}/UNLICENSE"