updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / python-pygame2-hg / PKGBUILD
blob2af55a6ee9ab16164ae547c1385b78d9387c3b44
1 pkgname=python-pygame2-hg
2 pkgver=25
3 pkgrel=1
4 pkgdesc="Pygame Reloaded, a Python game library"
5 arch=(any)
6 url="http://code.google.com/p/pgreloaded/"
7 license=('LGPL')
8 depends=('python' 'sdl_mixer' 'sdl_ttf' 'sdl_image' 'sdl_gfx' 'portmidi')
9 makedepends=('mercurial')
10 conflicts=('pygame2-py3')
11 provides=('pygame2-py3')
13 _hgroot=https://pgreloaded.googlecode.com/hg/
14 _hgrepo=pgreloaded
16 build() {
17   cd "$srcdir"
18   msg "Connecting to Mercurial server...."
20   if [[ -d "$_hgrepo" ]]; then
21     cd "$_hgrepo"
22     hg pull -u
23     msg "The local files are updated."
24   else
25     hg clone "$_hgroot" "$_hgrepo"
26   fi
28   msg "Mercurial checkout done or server timeout"
29   msg "Starting build..."
31   rm -rf "$srcdir/$_hgrepo-build"
32   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
33   cd "$srcdir/$_hgrepo-build"
35   python setup.py build
38 package() {
39   cd "$srcdir/$_hgrepo-build"
41   python setup.py install --root="$pkgdir"
42   cp -R doc "$pkgdir/usr/lib/python3.2/site-packages/pygame2"