contrib/delta/Pkgfile

30 lines
1009 B
Plaintext
Raw Normal View History

2020-11-19 09:32:15 +01:00
# Description: A viewer for git and diff output
# URL: https://github.com/dandavison/delta
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: rust
name=delta
2022-05-14 11:35:08 +02:00
version=0.13.0
2020-11-19 09:32:15 +01:00
release=1
source=(https://github.com/dandavison/delta/archive/$version/$name-$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"
2021-06-26 19:28:58 +02:00
cargo update --manifest-path $name-$version/Cargo.toml
cargo build --release --locked --manifest-path $name-$version/Cargo.toml
2020-12-31 12:12:33 +01:00
# install auto-completion files if the ports for it are installed
2021-12-07 18:41:02 +01:00
2021-06-26 19:28:58 +02:00
prt-get isinst zsh &&
install -Dm644 $name-$version/etc/completion/completion.zsh \
2021-12-07 18:41:02 +01:00
$PKG/usr/share/zsh/site-functions/_delta
2021-06-26 19:28:58 +02:00
prt-get isinst bash-completion &&
install -Dm644 $name-$version/etc/completion/completion.bash \
2021-12-07 18:41:02 +01:00
$PKG/usr/share/bash-completion/completions/delta
install -Dt $PKG/usr/bin $name-$version/target/release/$name
2020-11-19 09:32:15 +01:00
}