# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josh Taylor <joshtaylor.mail@gmail.com>
# Contributor: simo <simo@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgbase=pyopengl
pkgname=('python-opengl')
pkgver=3.1.10
pkgrel=3
pkgdesc="The cross platform Python binding to OpenGL and related APIs"
url="https://github.com/mcfletch/pyopengl"
license=('BSD-3-Clause')
arch=('any')
depends=('python' 'freeglut')
makedepends=('python-build' 'python-setuptools' 'python-installer' 'python-wheel')
source=("https://pypi.python.org/packages/source/P/PyOpenGL/pyopengl-${pkgver}.tar.gz")
sha512sums=('f11c94e442e0954453974900de5c1ef984d19f92ffc152fcc904a81aedc39ed294f4c51a6f1247e85499224f60422c4567e52516c156079d4efabbdd437e8f7d')

build() {
  cd pyopengl-${pkgver}

  python -m build --wheel --no-isolation
}

package_python-opengl() {
  cd pyopengl-${pkgver}

  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
