# $Id: PKGBUILD 139612 2015-09-08 14:06:47Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>

pkgname=python2-btchip
pkgver=0.1.16
pkgrel=1
pkgdesc="Python library to communicate with BTChip dongle"
arch=('any')
depends=('python2-hidapi')
makedepends=('python2-setuptools')
optdepends=('btchip-udev: access BTChip as non-root user')
url="https://github.com/LedgerHQ/btchip-python"
license=('Apache')
source=($pkgname-$pkgver.tar.gz::https://github.com/LedgerHQ/btchip-python/archive/v$pkgver.tar.gz)
sha256sums=('4c9e85977485c01c11fa4513f10f2e5a5f06afa1d04b5270a13d70606ccd4527')

build() {
  cd btchip-python-$pkgver

  python2 setup.py build
}

package() {
  cd btchip-python-$pkgver

  python2 setup.py install --root="$pkgdir" --optimize=1
}
