summaryrefslogtreecommitdiff
path: root/staging/python-pygame/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'staging/python-pygame/PKGBUILD')
-rw-r--r--staging/python-pygame/PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/staging/python-pygame/PKGBUILD b/staging/python-pygame/PKGBUILD
new file mode 100644
index 000000000..2cd71fc35
--- /dev/null
+++ b/staging/python-pygame/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 167394 2012-10-01 22:41:51Z eric $
+# Maintainer: Eric BĂ©langer <eric@archlinux.org>
+
+pkgbase=python-pygame
+pkgname=python2-pygame
+pkgver=1.9.1
+pkgrel=6
+pkgdesc="Python game library"
+arch=('i686' 'x86_64')
+url="http://www.pygame.org/"
+license=('LGPL')
+depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python2' 'portmidi')
+source=(http://pygame.org/ftp/pygame-${pkgver}release.tar.gz \
+ config.patch pygame-v4l.patch)
+sha1sums=('a45aeb0623e36ae7a1707b5f41ee6274f72ca4fa'
+ '285815e28705d5a2aea53c9d952d35fddf10dd13'
+ '7e693fb2ef5ef636f9965ba1a4eb854f8b0b5070')
+
+build() {
+ cd "${srcdir}/pygame-${pkgver}release"
+ patch -Np0 -i "${srcdir}/config.patch"
+ patch -Np1 -i "${srcdir}/pygame-v4l.patch"
+}
+
+package_python2-pygame() {
+ cd "${srcdir}/pygame-${pkgver}release"
+ python2 config.py -auto
+ 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"
+
+ find "${pkgdir}" -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#' {} +
+
+# Fixing permissions
+ chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
+}