updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / python-urwid-git / PKGBUILD
blob6ec8e3c488f4406368aef8a5cb7d8a8788d68c1e
1 # Maintainer: Mark Foxwell <fastfret79@archlinux.org.uk>
2 pkgname=python-urwid-git
3 pkgver=20111108
4 pkgrel=1
5 pkgdesc="Console user interface library for Python"
6 arch=('any')
7 url="https://github.com/wardi/urwid"
8 license=('LGPL')
9 depends=('python')
10 makedepends=('git')
11 provides=('python-urwid')
12 conflicts=('python-urwid' 'python-urwid-hg')
14 _gitroot="https://github.com/wardi/urwid.git"
15 _gitname="master"
17 build() {
18   cd "$srcdir"
19   msg "Connecting to GIT server...."
21   if [ -d $_gitname ] ; then
22     cd $_gitname && git pull origin
23     msg "The local files are updated."
24   else
25     git clone $_gitroot $_gitname
26   fi
28   msg "GIT checkout done or server timeout"
29   msg "Starting make..."
31   rm -rf "$srcdir/$_gitname-build"
32   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
33   cd "$srcdir/$_gitname-build"
35   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
36         -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
37         $(find ./ -name '*.py')
40   python2 setup.py install --prefix=/usr --root=$pkgdir