# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: Gavin Yancey <gyancey@hmc.edu>
# Contributor: Timofey Titovets <nefelim4ag@gmail.com>

pkgname=bees
pkgver=0.6.5
pkgrel=1
pkgdesc="Best-Effort Extent-Same, a btrfs deduplicator daemon"
arch=('x86_64')
url="https://github.com/Zygo/bees"
license=('GPL3')
depends=('util-linux-libs' 'bash')
makedepends=('markdown' 'btrfs-progs' 'systemd')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Zygo/bees/archive/v${pkgver}.tar.gz")
sha256sums=('f7ab73a6adc48b36bddf408ebc7625770464d8722a134e0fb2fc77e2dbc732b5')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make BEES_VERSION="${pkgver}"
}

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

  make install DESTDIR="${pkgdir}" BEES_VERSION="${pkgver}"

  mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin"
}
