# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=compsize
pkgver=1.5
pkgrel=1
pkgdesc="Calculate compression ratio of a set of files on Btrfs"
arch=(x86_64)
url="https://github.com/kilobyte/compsize"
license=(GPL)
depends=(glibc)
makedepends=(btrfs-progs git)
_commit=0ae6d84b3ac1ac62f6976ce6bf1aa9bb94e83391  # tags/v1.5^0
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd $pkgname
  make
}

package() {
  cd $pkgname
  install -d "$pkgdir/usr/share/man/man8"
  make install PREFIX="$pkgdir/usr"
}
