summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6356bdbd6ac7f224df7db62d85f63d2105a7a432 (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
# Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
# Old Maintainer: Karol "Kenji Takahashi" Wo┼║niak <kenji.sx>
 
pkgname=python-cairo-git
pkgver=1.10.1.34.5a45b0b
pkgrel=1
pkgdesc="Python bindings for the cairo graphics library. Git version."
url="http://www.cairographics.org/"
arch=('i686' 'x86_64')
license=('LGPL3')
depends=('python' 'cairo>=1.12')
makedepends=('git' 'pkg-config')
options=('!libtool')
provides=("python-cairo=1.10.0")
conflicts=('python-cairo')
source=("${pkgname}::git://git.cairographics.org/git/pycairo")
md5sums=('SKIP')
 
pkgver() {
    cd ${srcdir}/${pkgname}
    PREFIX="pycairo_version        = '"
    ver=$(grep "$PREFIX" setup.py | sed "s/$PREFIX//" | sed "s/'//")
    revision=$(git rev-list --count HEAD)
    hash=$(git log --pretty=format:'%h' -n 1)
    echo $ver.$revision.$hash
}
 
package() {
    cd ${srcdir}/${pkgname}
    python3 setup.py install --root=${pkgdir}/ --optimize=1
}
 
# vim:set ts=4 sw=4 et: