updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / python-gudev-git / PKGBUILD
blob104f068d9463d33b5a1fc1c02f9b834e558aec75
1 # Contributor: Created byMatthew Bauer <mjbauer95@gmail.com>
2 # fixed by "reztho", uploaded by barabbas
3 _pkgname=python-gudev
4 pkgname=${_pkgname}-git
5 pkgver=20110605
6 pkgrel=1
7 pkgdesc="Python (PyGObject) bindings to the GUDev library"
8 arch=('i686' 'x86_64')
9 url="http://github.com/nzjrs/${_pkgname}"
10 license=('LGPL3')
11 depends=('python2')
12 makedepends=('git')
13 provides=("${_pkgname}")
14 conflicts=("${_pkgname}")
15 replaces=('conduit-svn')
17 _gitroot="git://github.com/nzjrs/${_pkgname}.git"
18 _gitname="${_pkgname}"
20 build() {
21   cd "${srcdir}"
22   msg "Connecting to GIT server...."
24   if [ -d ${_gitname} ] ; then
25     cd ${_gitname} && git pull origin
26     msg "The local files are updated."
27   else
28     git clone ${_gitroot} ${_gitname}
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "${srcdir}/${_gitname}-build"
35   git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
36   cd "${srcdir}/${_gitname}-build"
38   ./autogen.sh
39   ./configure --prefix=/usr PYTHON=python2
40   sed -i '/#include <pygobject\.h>/ i\
41 #include <python2.7/Python.h>' "${srcdir}/${_gitname}-build/gudevmodule.c"
42   make || return 1
43   make DESTDIR="${pkgdir}/" install