# $Id: PKGBUILD 142991 2015-10-05 12:26:11Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Cravix <dr.neemous@gmail.com>

pkgname=python2-pygame-sdl2
pkgver=6.99.6
pkgrel=1
pkgdesc='Reimplementation of portions of the pygame API using SDL2'
arch=('i686' 'x86_64')
url='https://github.com/renpy/pygame_sdl2'
license=('LGPL2.1' 'zlib')
depends=('python2' 'sdl2_image' 'sdl2_mixer' 'sdl2_ttf')
makedepends=('cython2')
source=("http://www.renpy.org/dl/${pkgver}/pygame_sdl2-for-renpy-${pkgver}.tar.bz2"
        'cython.patch')
sha256sums=('a3939d753a7481b7316d6fefe4ab3e777a52e4267ba518bf2ae91d50c7de63ec'
            '312c7f5b68aeee404cb60a46c9872cdac9b721af9eb8fb5c0312ed999c0b12c4')

prepare() {
  cd pygame-sdl2-for-renpy-${pkgver}

  patch -Np0 -i ../cython.patch
}

build() {
  cd pygame-sdl2-for-renpy-${pkgver}

  python2 setup.py build
}

package() {
  cd pygame-sdl2-for-renpy-${pkgver}

  python2 setup.py install --root="${pkgdir}" --prefix='/usr' --optimize='1'

  install -dm 755 "${pkgdir}"/usr/share/licenses/python2-pygame-sdl2
  install -m 644 COPYING.ZLIB "${pkgdir}"/usr/share/licenses/python2-pygame-sdl2/
}

# vim: ts=2 sw=2 et:
