# Description: interface to manage clipboard from the command line
# URL: https://github.com/robatipoor/cbs
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: rust xorg-libxcb

name=cbs
version=0.1.0
release=1
_commit=e3f75bcd1045d65727537b700ee3dabcdc12266a
source=(https://github.com/robatipoor/cbs/archive/$_commit/$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"

  cargo update --manifest-path $name-$_commit/Cargo.toml
  cargo fetch --manifest-path $name-$_commit/Cargo.toml --locked
  cargo build --release --locked --manifest-path $name-$_commit/Cargo.toml

  install -Dt $PKG/usr/bin $name-$_commit/target/release/$name
}
