# 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-pygments pkgver=2.18.0 pkgrel=1 pkgdesc="Python syntax highlighter" arch=('x86_64') url="https://pygments.org/" license=('BSD-2-Clause') depends=('python-hatchling') makedepends=( 'python-setuptools' 'python-build' 'python-installer' 'python-wheel' 'python-sphinx' 'python-wcag-contrast-ratio' ) source=(https://files.pythonhosted.org/packages/source/P/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz) sha256sums=(786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199) build() { cd ${pkgname#*-}-${pkgver} python3 -m build --wheel --no-isolation make -C doc html } package() { cd ${pkgname#*-}-${pkgver} python3 -m installer --destdir=${pkgdir} dist/*.whl mkdir -pv ${pkgdir}/usr/share/doc cp -rT doc/_build/html ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} install -Dm644 doc/pygmentize.1 -t ${pkgdir}/usr/share/man/man1 install -Dm644 external/pygments.bashcomp \ ${pkgdir}/usr/share/bash-completion/completions/pygmentize }