# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=mfoc
pkgver=0.10.7+38+gba072f1
pkgrel=2
pkgdesc="MiFare Classic Universal toolKit"
arch=(x86_64)
url="http://nfc-tools.org/"
license=(GPL2)
depends=(libnfc)
makedepends=(git)
_commit=ba072f16f6b2a655d51da2171ecfb83e26c0ef58 # Latest tested commit
source=(git+https://github.com/nfc-tools/mfoc.git#commit=${_commit})
sha256sums=(SKIP)

#pkgver() {
#  cd ${pkgname}
#  git describe --tags | sed 's/^mfoc-//;s/\([^-]*-g\)/r\1/;s/-/./;s/-/+/'
#}

build() {
  cd ${pkgname}
  autoreconf -is
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" install
}
