summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/python-pygame-hg/PKGBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/pcr/python-pygame-hg/PKGBUILD b/pcr/python-pygame-hg/PKGBUILD
new file mode 100644
index 000000000..c48317b19
--- /dev/null
+++ b/pcr/python-pygame-hg/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Márcio Silva <coadde@lavabit.com>
+
+_pkgname=pygame
+_pkgver=1.9.2
+_pyname=python
+_py3ver=3.3
+_py2ver=2.7
+_pkg3name=$_pyname-$_pkgname
+_pkg2name=${_pyname}2-$_pkgname
+_srcver=pre.d$(LC_ALL=C date -u +%Y%m%d)
+
+pkgbase=$_pyname-$_pkgname
+pkgname=(
+ $_pkg3name-hg
+ $_pkg2name-hg
+)
+pkgver=$_pkgver$_srcver
+pkgrel=1
+pkgdesc="${_pyname^} game library"
+arch=(
+ mips64el
+ x86_64
+ i686
+)
+url=http://www.$_pkgname.org/
+license=LGPL2.1
+depends=(
+ ffmpeg
+ portmidi
+ python
+ python2
+ #sdl_gfx
+ sdl_image
+ sdl_mixer
+ sdl_ttf
+)
+makedepends=mercurial
+source=hg+https://bitbucket.org/$_pkgname/$_pkgname
+sha512sums=SKIP
+
+package_python-pygame-hg() {
+ # disabled, due which conflicts with $_pkg2name
+ #provides=("$_pkg3name=$_pkgver")
+ #conflicts=$_pkg3name
+
+ cd $_pkgname
+
+ msg Building
+ find . -type f -exec sed -i "s|/usr/bin/env ${_pyname}2|/usr/bin/env $_pyname|" {} +
+ $_pyname config.py -auto
+ $_pyname setup.py install --root=$pkgdir --prefix=/usr
+
+ msg 'Copying the examples and tests'
+ cp -va examples lib/* $pkgdir/usr/lib/$_pyname$_py3ver/site-packages/$_pkgname
+ cp -va test/* $pkgdir/usr/lib/$_pyname$_py3ver/site-packages/$_pkgname/tests
+}
+
+package_python2-pygame-hg() {
+ provides=("$_pkg2name=$_pkgver")
+ conflicts=$_pkg2name
+
+ cd $_pkgname
+
+ msg Building
+ find . -type f -exec sed -i "s|/usr/bin/env $_pyname|/usr/bin/env ${_pyname}2|" {} +
+ ${_pyname}2 config.py -auto
+ ${_pyname}2 setup.py install --root=$pkgdir --prefix=/usr
+
+ msg 'Copying the examples and tests'
+ cp -va examples lib/* $pkgdir/usr/lib/$_pyname$_py2ver/site-packages/$_pkgname
+ cp -va test/* $pkgdir/usr/lib/$_pyname$_py2ver/site-packages/$_pkgname/tests
+}