summaryrefslogtreecommitdiff
path: root/pcr/python2-pycha/PKGBUILD
blob: ddf64550e57c40d246cf7d9ad629a8d430195f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer (Arch): Jakub Klinkovský <kuba.klinkovsky@gmail.com>
# Contributor: André Silva <emulatorman@hyperbola.info>
pkgname=python2-pycha
pkgver=279
pkgrel=1
pkgdesc="Pycha is a very simple Python package for drawing charts using the great Cairo library."
arch=('any')
url="http://bitbucket.org/lgs/pycha/"
license=('LGPL')
depends=('pycairo')
makedepends=('mercurial' 'python2-distribute')

_hgroot="https://bitbucket.org/lgs/pycha"
_hgrepo="pycha"

build() {
  cd "$srcdir"
  msg "Connecting to Mercurial server...."

  if [[ -d "$_hgrepo" ]]; then
    cd "$_hgrepo"
    hg pull -u
    msg "The local files are updated."
  else
    hg clone "$_hgroot" "$_hgrepo"
  fi

  msg "Mercurial checkout done or server timeout"
}

package() {
  cd "$srcdir/$_hgrepo"
  msg "Starting build..."
  python2 setup.py install --root=$pkgdir
}