# Contributer: Baruch Burstein <bmburstein at gmail dot com>

pkgname=cloc
pkgver=1.88
pkgrel=1
pkgdesc="Count lines of code"
arch=('any')
url="https://github.com/AlDanial/cloc"
license=('GPL')
depends=('perl' 'perl-Algorithm-Diff' 'perl-Regexp-Common' 'perl-Parallel-ForkManager')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/AlDanial/cloc/archive/${pkgver}.tar.gz)
sha256sums=('e85c2d1b3ec389d892955cf20b3fa5c797e81136e231d9a09e4f4c62e272f8cd')
noextract=(${pkgname}-${pkgver}.tar.gz)

prepare() {
  [[ -d ${pkgname}-${pkgver} ]] && rm -rf ${pkgname}-${pkgver}
  tar -xzvf ${pkgname}-${pkgver}.tar.gz -C ${srcdir} || true
}

package() {
  cd ${pkgname}-${pkgver}/Unix
  make DESTDIR="${pkgdir}" install
}
