2022-09-14 23:58:16 +00:00
|
|
|
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
|
2024-05-07 02:57:25 +00:00
|
|
|
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
|
2024-03-13 12:58:11 +00:00
|
|
|
# Contributor: Maxim Baz <archlinux at maximbaz dot com>
|
2022-09-14 23:58:16 +00:00
|
|
|
|
|
|
|
# ALARM:
|
|
|
|
# - compile on aarch64 with JEMALLOC_SYS_WITH_LG_PAGE=16 to support
|
|
|
|
# systems with 16k or 64k page size
|
|
|
|
|
|
|
|
pkgname=fd
|
2024-05-08 15:36:22 +00:00
|
|
|
pkgver=10.1.0
|
2024-05-07 02:57:25 +00:00
|
|
|
pkgrel=1
|
2022-09-14 23:58:16 +00:00
|
|
|
pkgdesc='Simple, fast and user-friendly alternative to find'
|
|
|
|
arch=('x86_64')
|
|
|
|
url=https://github.com/sharkdp/fd
|
2024-03-13 12:58:11 +00:00
|
|
|
license=('MIT' 'Apache-2.0')
|
2022-09-14 23:58:16 +00:00
|
|
|
depends=('gcc-libs')
|
|
|
|
makedepends=('rust')
|
|
|
|
source=("fd-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
2024-05-08 15:36:22 +00:00
|
|
|
sha512sums=('6ab75965cb1852dd677ffb07d51db852c993b59551ab2e3a87bf81560a41c5fff35e63e9e09aa495c6c42cd9d038bf8ad85c491095435c9881101cf6284385df')
|
2024-05-07 02:57:25 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd fd-$pkgver
|
|
|
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
|
|
}
|
2022-09-14 23:58:16 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd fd-$pkgver
|
|
|
|
[[ $CARCH == "aarch64" ]] && export JEMALLOC_SYS_WITH_LG_PAGE=16
|
|
|
|
export CFLAGS+=" -ffat-lto-objects"
|
2024-05-07 02:57:25 +00:00
|
|
|
cargo build --release --locked --offline
|
2022-09-14 23:58:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd fd-$pkgver
|
2024-05-07 02:57:25 +00:00
|
|
|
cargo test --locked --offline
|
2022-09-14 23:58:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd fd-$pkgver
|
|
|
|
install -Dm755 target/release/fd "$pkgdir"/usr/bin/fd
|
2022-11-03 12:34:13 +00:00
|
|
|
|
|
|
|
make completions
|
|
|
|
install -Dm644 autocomplete/fd.bash "$pkgdir"/usr/share/bash-completion/completions/fd
|
|
|
|
install -Dm644 autocomplete/fd.fish "$pkgdir"/usr/share/fish/vendor_completions.d/fd.fish
|
|
|
|
install -Dm644 autocomplete/_fd "$pkgdir"/usr/share/zsh/site-functions/_fd
|
|
|
|
|
2022-09-14 23:58:16 +00:00
|
|
|
install -Dm644 doc/fd.1 "$pkgdir"/usr/share/man/man1/fd.1
|
|
|
|
install -Dm644 LICENSE-MIT "$pkgdir"/usr/share/licenses/fd/LICENSE-MIT
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|