1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/ripgrep/APKBUILD
ptrcnull fbcf4c4f11 */*: utilise sparse crates.io fetches
this is a million times faster

new only in rust 1.68, and fails on older versions,
but we have only latest in aports and don't support anything else, so
it's okay.
2023-03-10 00:35:53 +01:00

61 lines
1.9 KiB
Text

# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=ripgrep
pkgver=13.0.0
pkgrel=3
pkgdesc="ripgrep combines the usability of The Silver Searcher with the raw speed of grep"
url="https://github.com/BurntSushi/ripgrep"
arch="all !riscv64" # libc crate sup
license="MIT OR Public-Domain"
makedepends="cargo asciidoc pcre2-dev"
checkdepends="xz"
subpackages="$pkgname-doc
$pkgname-bash-completion:bashcomp:noarch
$pkgname-zsh-completion:zshcomp:noarch
$pkgname-fish-completion::noarch
"
source="https://github.com/BurntSushi/ripgrep/archive/$pkgver/ripgrep-$pkgver.tar.gz"
export PCRE2_SYS_STATIC=0 # use system libpcre2
export JEMALLOC_SYS_WITH_LG_PAGE=16 # 2**16 = 64k
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
build() {
cargo build --release --locked --features 'pcre2'
}
check() {
cargo test --release --locked --features 'pcre2'
}
package() {
install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
install -Dm644 "target/release/build/ripgrep-"*/out/rg.1 \
"$pkgdir/usr/share/man/man1/rg.1"
install -Dm644 "$builddir"/target/release/build/ripgrep-*/out/rg.fish \
-t "$pkgdir"/usr/share/fish/completions
}
bashcomp() {
depends=""
pkgdesc="Bash completions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
install -Dm644 "$builddir/target/release/build/ripgrep-"*/out/rg.bash \
"$subpkgdir/usr/share/bash-completion/completions/rg"
}
zshcomp() {
depends=""
pkgdesc="Zsh completions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel zsh"
mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/
install -Dm644 "$builddir/complete/_rg" \
"$subpkgdir/usr/share/zsh/site-functions/_rg"
}
sha512sums="
9321532e4bf633ecd200d98873b6773230d046d7bd075f223f09a68531cef4e4138f01c6b41e0f8697805963ae7e0d44d542c6d94025d9a06fbbef3562c17734 ripgrep-13.0.0.tar.gz
"