blob: eeda6d34b805dae9bc5135061092826ec64ed1bb (
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.1
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="fef6b0d863d45a182a1ba671ddc4f6cb15745447cdaed3e1efeb05fad97f02aa0a56698517648a942bde263d74e06ad7781bcf487757aeb3b124ef64dc525024 pycairo-1.18.1.tar.gz"
|