# Contributor: Kevin McCarthy <me@kevinmccarthy.org>
pkgname=offlineimap-git
pkgver=20100514
pkgrel=1
pkgdesc="A powerful IMAP/Maildir synchronization tool"
url="http://wiki.github.com/jgoerzen/offlineimap/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('python')
makedepends=('git')
conflicts=('offlineimap')
provides=('offlineimap')
source=()
md5sums=()
_gitroot="git://github.com/jgoerzen/offlineimap.git"
_gitname="offlineimap"
build() {
cd ${srcdir}
msg "Connecting to GIT server...."
if [ -d ${srcdir}/$_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
cd ${srcdir}
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone $_gitname $_gitname-build
cd ${srcdir}/$_gitname-build
python2 setup.py install --prefix=${pkgdir}/usr
}