# Maintainer: Natanael Copa pkgname=py-cairo pkgver=1.16.3 pkgrel=1 pkgdesc="Python bindings for the cairo graphics library" url="http://cairographics.org/pycairo/" arch="all" license="LGPL-2.0-or-later" depends="" makedepends="python2-dev python3-dev cairo-dev" install="" 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="d60978f85eb0430f2038b0e7d0bce23602e8c180a7611eea424fd8bc3cdd8ce249af364abd0e77ab3b7ab439761721cba5c2398f51af2a89add3fb7fda8aa5db pycairo-1.16.3.tar.gz"