#!/SBUILD _disabled: false pkg: "ripgrep" pkg_id: "burntsushi.ripgrep" pkg_type: "static" ghcr_pkg: "burntsushi/ripgrep" category: - "ConsoleOnly" - "Utility" description: "A search tool that combines the usability of ag with the raw speed of grep" homepage: - "https://github.com/BurntSushi/ripgrep" maintainer: - "QaidVoid (contact@qaidvoid.dev)" license: - "MIT" - "Unlicense" build_deps: - "docker" note: - "Built from source with static musl linking" - "[PORTABLE] (Portable Static Binary)" - "[NO_DESKTOP_INTEGRATION]" provides: - "rg" repology: - "ripgrep" src_url: - "https://github.com/BurntSushi/ripgrep" tag: - "dev-tools" - "cli" - "utility" x_exec: host: - "x86_64-linux" - "aarch64-linux" container: "ghcr.io/pkgforge/devscripts/alpine-builder" shell: "bash" pkgver: | curl -qfsSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq -r '.tag_name' run: | set -e cd "$(mktemp -d)" source "$HOME/.cargo/env" export RUST_TARGET="${ARCH}-unknown-linux-musl" export RUSTFLAGS="-C target-feature=+crt-static -C link-self-contained=yes" git clone --filter=blob:none --quiet "https://github.com/BurntSushi/ripgrep" cd ripgrep git checkout "$PKGVER" cargo build --target="$RUST_TARGET" --profile=release-lto --features=pcre2 cp "target/$RUST_TARGET/release-lto/rg" "$SBUILD_OUTDIR/rg" cp "LICENSE-MIT" "$SBUILD_OUTDIR/"