blob: f98845e3eae43c9b37e91ecb5895ac25a270757b (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-cairo
pkgver=1.18.2
pkgrel=0
pkgdesc="Python bindings for the cairo graphics library"
url="http://cairographics.org/pycairo/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="python2-dev python3-dev cairo-dev"
subpackages="$pkgname-dev py2-cairo:_py py3-cairo:_py"
source="https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz
"
builddir="$srcdir"/pycairo-$pkgver
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py check
python3 setup.py check
}
package() {
cd "$builddir"
python2 setup.py install --prefix=/usr --root="$pkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
_py() {
local py=${subpkgname%-*}
local pyver=${py#py}
local python="python$pyver"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/$python* "$subpkgdir"/usr/lib/
}
dev() {
default_dev
replaces="py2-cairo-dev py3-cairo-dev"
}
sha512sums="279ea80413ba55d493d51455685da09afa1f5c45e2930c3fca3e417a8afe6645a0d8131201f79482de59e5ec56cfef62eac65ed88fe88866bfcc06503dcc59e0 pycairo-1.18.2.tar.gz"
|