* add ripgrep

This commit is contained in:
Alexander Baldeck 2024-09-10 10:09:44 +02:00
parent a216db36e3
commit 6e6bda69ed
3 changed files with 68 additions and 0 deletions

15
ripgrep/.SRCINFO Normal file
View File

@ -0,0 +1,15 @@
pkgbase = ripgrep
pkgdesc = A search tool that combines the usability of ag with the raw speed of grep
pkgver = 14.1.1
pkgrel = 1
url = https://github.com/BurntSushi/ripgrep
arch = x86_64
license = MIT
license = custom
makedepends = rust
depends = gcc-libs
depends = pcre2
source = ripgrep-14.1.1.tar.gz::https://github.com/BurntSushi/ripgrep/archive/14.1.1.tar.gz
sha512sums = 6aacbc99025c1c0c301491574953bed4d7dd04f9ce7ce999c47eaa50d71ea7edd905f718e2e94031a5ad651d4daebce772c57ed291c639938991ad4574be8244
pkgname = ripgrep

3
ripgrep/.nvchecker.toml Normal file
View File

@ -0,0 +1,3 @@
[ripgrep]
source = "git"
git = "https://github.com/BurntSushi/ripgrep.git"

50
ripgrep/PKGBUILD Normal file
View File

@ -0,0 +1,50 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: Maxim Baz <archlinux at maximbaz dot com>
# Contributor: Andrew Gallant <jamslam@gmail.com>
pkgname=ripgrep
pkgver=14.1.1
pkgrel=1
pkgdesc="A search tool that combines the usability of ag with the raw speed of grep"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/BurntSushi/ripgrep"
license=('MIT' 'custom')
depends=('gcc-libs' 'pcre2')
makedepends=('rust')
source=("$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('6aacbc99025c1c0c301491574953bed4d7dd04f9ce7ce999c47eaa50d71ea7edd905f718e2e94031a5ad651d4daebce772c57ed291c639938991ad4574be8244')
build() {
cd "$pkgname-$pkgver"
cargo build --release --locked --features 'pcre2'
}
check() {
cd "$pkgname-$pkgver"
cargo test --release --locked --features 'pcre2'
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
mkdir -p "$pkgdir/usr/share/zsh/site-functions"
target/release/rg --generate complete-zsh > "$pkgdir/usr/share/zsh/site-functions/_rg"
mkdir -p "$pkgdir/usr/share/bash-completion/completions"
target/release/rg --generate complete-bash > "$pkgdir/usr/share/bash-completion/completions/rg"
mkdir -p "$pkgdir/usr/share/fish/vendor_completions.d"
target/release/rg --generate complete-fish > "$pkgdir/usr/share/fish/vendor_completions.d/rg.fish"
mkdir -p "$pkgdir/usr/share/man/man1"
target/release/rg --generate man > "$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"
}