# Contributor: Jelle van der Waa <jelle@archlinux.org>
# Contributor: Eli Schwartz <eschwartz93@gmail.com>
# Maintainer: bill-auger <bill-auger@programmer.net>


pkgname=('python2-dukpy')
pkgver=0.3
pkgrel=4
pkgdesc="Python bindings for the duktape embeddable JavaScript engine"
arch=(armv7h i686 x86_64)
url=https://github.com/kovidgoyal/dukpy
license=('MIT')

makedepends=('python-setuptools' 'python2-setuptools')
depends=('python2')
source=(https://github.com/kovidgoyal/dukpy/archive/v${pkgver}.tar.gz)

sha256sums=('cc78c39ebba51f381c623b164cfb7dcf3caddf515fe7094bc53b7eca5d4e435e')


build()
{
  cd "${srcdir}/dukpy-${pkgver}"

  python2 setup.py build
}

check()
{
  cd "${srcdir}/dukpy-${pkgver}"

  python2 setup.py test
}

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

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

  install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/python2-dukpy/LICENSE.txt
}
