# This is an example PKGBUILD file. Use this as a start to creating your own, # and remove these comments. For more information, see 'man PKGBUILD'. # NOTE: Please fill out the license field for your package! If it is unknown, # then please put 'unknown'. # Maintainer: Future Linux Team pkgname=(python-cairo python-cairo-docs) pkgbase=python-cairo pkgver=1.27.0 pkgrel=1 pkgdesc="Python bindings for the cairo graphics library" arch=('x86_64') url="https://pycairo.readthedocs.io/en/latest" license=('LGPL2.1' 'MPL') depends=('python' 'cairo') makedepends=('meson' 'python-sphinx' 'python-sphinx_rtd_theme') source=(https://github.com/pygobject/pycairo/releases/download/v${pkgver}/py${pkgbase#*-}-${pkgver}.tar.gz) sha256sums=(5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430) build() { cd py${pkgbase#*-}-${pkgver} meson setup build --prefix=/usr --buildtype=release meson compile -C build } package_python-cairo() { cd py${pkgbase#*-}-${pkgver} meson install -C build --destdir ${pkgdir} # compile Python bytecode python3 -m compileall -d /usr/lib64 ${pkgdir}/usr/lib64 python3 -O -m compileall -d /usr/lib64 ${pkgdir}/usr/lib64 } package_python-cairo-docs() { pkgdesc="Developer documentation for Pycairo" depends=() python3 -m sphinx -b html py${pkgbase#*-}-${pkgver}/docs ${pkgdir}/usr/share/doc/pycairo/html rm -r ${pkgdir}/usr/share/doc/pycairo/html/.doctrees }