# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=thin-provisioning-tools
pkgver=1.1.0
pkgrel=1
pkgdesc='Suite of tools for manipulating the metadata of the dm-thin device-mapper target'
arch=('x86_64')
url='https://github.com/jthornber/thin-provisioning-tools'
license=('GPL3')
depends=('gcc-libs' 'systemd-libs')
makedepends=('git' 'cargo' 'clang' 'device-mapper')
source=("git+https://github.com/jthornber/thin-provisioning-tools#tag=v${pkgver}")
sha256sums=('652db5ebaa80e9b44ba62ba327aba7e237b12de37e130fee7c3f4fd817e1f103')

build() {
  cd "${srcdir}/${pkgname}"

  cargo build --release
}

package() {
  cd "${srcdir}/${pkgname}"

  make \
    DESTDIR="${pkgdir}"/usr \
    BINDIR="${pkgdir}"/usr/bin \
    DATADIR="${pkgdir}"/usr/share \
    install
}

