[new package] ripgrep-all 0.10.6
This commit is contained in:
committed by
Maksim Bondarenkov
parent
199fb0bf32
commit
ebfe57f92f
64
mingw-w64-ripgrep-all/PKGBUILD
Normal file
64
mingw-w64-ripgrep-all/PKGBUILD
Normal file
@@ -0,0 +1,64 @@
|
||||
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>
|
||||
|
||||
_realname=ripgrep-all
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.10.6
|
||||
pkgrel=1
|
||||
pkgdesc="ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc. (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://github.com/phiresky/ripgrep-all/'
|
||||
license=('spdx:AGPL-3.0-only')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-ripgrep" "${MINGW_PACKAGE_PREFIX}-xz")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-pkgconf")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-ffmpeg: for the ffmpeg adapter"
|
||||
"${MINGW_PACKAGE_PREFIX}-graphicsmagick: for the pdfpages adapter"
|
||||
"${MINGW_PACKAGE_PREFIX}-poppler: for the poppler adapter"
|
||||
"${MINGW_PACKAGE_PREFIX}-tesseract-ocr: for the tesseract adapter")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-poppler")
|
||||
source=("https://github.com/phiresky/ripgrep-all/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('06cd619ad6638be206266a77fdf11034dc2dc15d97b3a057b0d6280a17334680')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
# there are some build issues when you have installed rust from both msys2 and rustup:
|
||||
# - it downloads extra deps at build() (MSVC specific)
|
||||
# - ...and eventually it failes (problems with compiling using MSVC)
|
||||
rm -f rust-toolchain.toml
|
||||
|
||||
local _target="${CARCH}-pc-windows-gnu"
|
||||
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
|
||||
_target="${CARCH}-pc-windows-gnullvm"
|
||||
fi
|
||||
cargo fetch --locked --target "${_target}"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
WINAPI_NO_BUNDLED_LIBRARIES=1 \
|
||||
cargo build --release --frozen
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
WINAPI_NO_BUNDLED_LIBRARIES=1 \
|
||||
cargo test --release --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
WINAPI_NO_BUNDLED_LIBRARIES=1 \
|
||||
cargo install \
|
||||
--offline \
|
||||
--no-track \
|
||||
--frozen \
|
||||
--path . \
|
||||
--root "${pkgdir}${MINGW_PREFIX}"
|
||||
|
||||
install -Dm644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md"
|
||||
}
|
||||
Reference in New Issue
Block a user