desktop/python2-pygame/PKGBUILD
2016-04-03 23:50:41 +02:00

40 lines
1.3 KiB
Bash

pkgname=python2-pygame
pkgver=1.9.1
pkgrel=6
pkgdesc="Python game library"
arch=('x86_64')
url="http://www.pygame.org/"
license=('LGPL')
depends=('python2' 'sdl_mixer' 'libvorbis' 'sdl_ttf' 'sdl_image' 'smpeg')
conflicts=('pygame' 'python-pygame')
replaces=('pygame' 'python-pygame')
provides=('pygame' 'python-pygame')
source=(http://pygame.org/ftp/pygame-${pkgver}release.tar.gz
'pygame-config.patch'
'pygame-v4l.patch'
'pygame-joystick.patch')
md5sums=('1c4cdc708d17c8250a2d78ef997222fc'
'aaa668f3cd710d8604114501ea6a6f48'
'9915b63865c16519e80007909beed876'
'c236b303ba3fe2dfd310d47b496ac1c2')
build() {
cd "${srcdir}/pygame-${pkgver}release"
patch -p0 -i "${srcdir}/pygame-config.patch"
patch -p1 -i "${srcdir}/pygame-v4l.patch"
patch -p1 -i "${srcdir}/pygame-joystick.patch"
python2 config.py -auto
}
package() {
cd "${srcdir}/pygame-${pkgver}release"
python2 setup.py install --root="${pkgdir}" --prefix=/usr
# Copying the examples and tests
cp -R examples lib/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame"
cp -R test/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame/tests"
# Fixing permissions
chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
}