# Description: A suite of tools for manipulating the metadata of the dm-thin device-mapper target.
# URL: https://github.com/jthornber/thin-provisioning-tools
# Maintainer: unmaintained
# Depends on: rust

name=thin-provisioning-tools
version=1.0.4
release=1
source=(https://github.com/jthornber/$name/archive/v$version/$name-v$version.tar.gz)

build() {
  prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
  [[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust

  cargo build --release --manifest-path $name-$version/Cargo.toml

  make -C $name-$version DESTDIR=$PKG/usr install
}
