summaryrefslogtreecommitdiff
path: root/delta/Pkgfile
blob: 54b0caa7e4375d22d4eb7f1c7b01225ab1c099df (plain)
    1 # Description: A viewer for git and diff output
    2 # URL: https://github.com/dandavison/delta
    3 # Maintainer: Tim Biermann, tbier at posteo dot de
    4 # Depends on: rust
    5 
    6 name=delta
    7 version=0.6.0
    8 release=1
    9 source=(https://github.com/dandavison/delta/archive/$version/$name-$version.tar.gz)
   10 
   11 build() {
   12   cd $name-$version
   13   prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
   14   mkdir "$PKGMK_SOURCE_DIR/rust" || true
   15   export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
   16 
   17   cargo update
   18   cargo fetch
   19   cargo build --release --locked
   20   install -Dt $PKG/usr/bin target/release/delta
   21 
   22   # install auto-completion files if the ports for it are installed
   23   if [ -e /usr/share/zsh ]; then
   24     install -Dm644 etc/completion/completion.zsh \
   25       $PKG/usr/share/zsh/site-functions/_delta
   26   fi
   27   if [ -e /usr/lib/pkgconfig/bash-completion.pc ]; then
   28     install -Dm644 etc/completion/completion.bash \
   29       $PKG/usr/share/bash-completion/completions/delta
   30   fi
   31 }

Generated by cgit