description="Cat clone with syntax highlighting and git integration"
url="https://github.com/sharkdp/bat"

packager="tnut <tnut@nutyx.org>"
contributors="Greg, Rems"

makedepends=(git make-ca libssh2 cmake rustc)

name=bat
version=0.16.0

PKGMK_KEEP_SOURCES='NO'
source=(https://github.com/sharkdp/bat/archive/v${version}.tar.gz)

build() {

cd $name-$version
cargo build --release
install -Dm755 target/release/$name "$PKG/usr/bin/$name"
find  . -name bat.1 -type f \
-exec install -Dm644 {} $PKG/usr/share/man/man1/bat.1 \;
find . -name bast.zsh -type f \
-exec install -Dm644 {} $PKG/usr/share/zsh/site-functions/_bat \;

}
