python-cairo/PKGBUILD

45 lines
1.4 KiB
Bash
Raw Normal View History

2024-11-02 18:20:44 +08:00
# 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 <future_linux@163.com>
2024-11-02 22:44:08 +08:00
pkgname=(python-cairo python-cairo-docs)
pkgbase=python-cairo
pkgver=1.27.0
2024-11-02 18:20:44 +08:00
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')
2024-11-02 22:44:08 +08:00
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)
2024-11-02 18:20:44 +08:00
build() {
2024-11-02 22:44:08 +08:00
cd py${pkgbase#*-}-${pkgver}
2024-11-02 18:20:44 +08:00
meson setup build --prefix=/usr --buildtype=release
meson compile -C build
}
2024-11-02 22:44:08 +08:00
package_python-cairo() {
cd py${pkgbase#*-}-${pkgver}
2024-11-02 18:20:44 +08:00
meson install -C build --destdir ${pkgdir}
2024-11-02 22:44:08 +08:00
# 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
2024-11-02 18:20:44 +08:00
}