# Contributor (AUR?): Eelco Cramer <eelco@servicelab.org>
# Maintainer: Parabola Aurélien Desbrières <aurelien@xload.io>
# Contributor: Luke Shumaker <lukeshu@lukeshu.com>

pkgname=python-lirc
pkgver=1.2.3
_gitver='commit=4091fe918f3eed2513dad008828565cace408d2f' # tag your releases, man
pkgrel=1
pkgdesc="LIRC extension written in Cython for Python 3"
arch=('x86_64' 'i686' 'armv7h')
url="https://github.com/tompreston/python-lirc"
license=('GPL3')
depends=('python'
         'lirc'
	 'git'
         'cython')
makedepends=('python-setuptools')
# We need to re-run cython for 3.7, and the needed files aren't in the PyPI archive
#source=("https://pypi.io/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
#sha256sums=(61481b36cc9c10cd215f7ddd93990f7c722af3d918c297bf2366fce1ca39b1f3)
source=("git+${url}#${_gitver}")
sha256sums=('SKIP')

build() {
  cd "$srcdir/$pkgname"
  make py3
}

package() {
  cd "$srcdir/$pkgname"
  python setup.py install --root=$pkgdir --optimize=1
}
