# Maintainer: Fredrick Brennan # Maintainer: Pig Monkey # Contributor: mutantmonkey # Contributor: Stephan Eisvogel # Contributor: Daniel Reuter pkgname=ocrmypdf pkgver=16.2.0 pkgrel=1 pkgdesc="A tool to add an OCR text layer to scanned PDF files, allowing them to be searched" url="https://github.com/ocrmypdf/OCRmyPDF" arch=('any') license=(MPL2) # NOTICE: The number of dependencies we rely on is *very high*. If the program does not run after an upgrade, make sure all your deps are upgraded, especially AUR deps! depends=('python>=3.9' 'img2pdf' 'python-pillow' 'tesseract' 'ghostscript' 'unpaper' 'pngquant' 'python-pikepdf' 'python-reportlab' 'python-pdfminer' 'python-tqdm' 'python-pluggy' 'python-rich' 'python-importlib_resources' 'python-packaging' 'python-deprecation') makedepends=('python-setuptools-scm>=7.0.5' 'python-build' 'python-installer' 'python-wheel') optdepends=('jbig2enc: Better compression algorithm; results in smaller PDF files') source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz") sha256sums=('1fa2b4a8b4b6801dc66f50191fc944a438e6cd68585151326e87b87d829dff35') install="${pkgname}.install" build() { cd "${srcdir}/${pkgname}-${pkgver}" python -m build --wheel --no-isolation } package() { cd "${srcdir}/${pkgname}-${pkgver}" python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE.rst } # vim:set ts=2 sw=2 et: