updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / beets-hg / PKGBUILD
blobf62b4571f1e52761d194f9738e857f509c9acddc
1 # Maintainer: Adrian Sampson <adrian@radbox.org>
3 python=python2
5 pkgname=beets-hg
6 pkgver=HG
7 pkgrel=1
8 pkgdesc="flexible music library manager and tagger - dev version"
9 arch=('any')
10 url="http://beets.radbox.org/"
11 license=('MIT')
12 depends=('python2-munkres' 'mutagen'
13          'python2-distribute' 'python-unidecode')
14 makedepends=('mercurial')
15 provides=('beets')
16 conflicts=('beets')
18 _hgroot="https://beets.googlecode.com/hg/"
19 _hgrepo="beets"
21 build() {
22   cd "$srcdir"
23   msg "Connecting to Mercurial server...."
25   if [ -d $_hgrepo ] ; then
26     cd $_hgrepo
27     hg pull -u
28     msg "The local files are updated."
29   else
30     hg clone $_hgroot $_hgrepo
31   fi
33   msg "Mercurial checkout done or server timeout"
34   msg "Starting setup.py build..."
36   rm -rf "$srcdir/$_hgrepo-build"
37   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
38   cd "$srcdir/$_hgrepo-build"
40   $python setup.py build || return 1
43 package() {
44   cd "$srcdir/$_hgrepo-build"
45   $python setup.py install --root=$pkgdir
46