contrib/fd/Pkgfile

24 lines
917 B
Plaintext
Raw Normal View History

2020-05-30 14:30:04 +02:00
# Description: Simple, fast and user-friendly alternative to find
# URL: https://github.com/sharkdp/fd
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: rust
name=fd
2022-12-09 22:53:06 +01:00
version=8.6.0
2020-05-30 14:30:04 +02:00
release=1
source=(https://github.com/sharkdp/fd/archive/v$version/$name-v$version.tar.gz)
build() {
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
mkdir "$PKGMK_SOURCE_DIR/rust" || true
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2022-11-04 06:38:07 +01:00
cargo build --release --manifest-path $name-$version/Cargo.toml
install -Dt $PKG/usr/bin $name-$version/target/release/$name
2020-05-30 14:30:04 +02:00
2022-11-04 06:38:07 +01:00
prt-get isinst bash-completions && install -Dm644 $name-$version/target/release/build/fd-find-*/out/fd.bash $PKG/usr/share/bash-completion/completions/fd
prt-get isinst zsh && install -Dm644 $name-$version/contrib/completion/_fd $PKG/usr/share/zsh/site-functions/_fd
install -Dm644 $name-$version/doc/fd.1 $PKG/usr/share/man/man1/fd.1
2020-05-30 14:30:04 +02:00
}