1 # Maintainer: Bruno Pagani <archange@archlinux.org>
6 pkgdesc="Losslessly convert raster images to PDF"
8 url="https://gitlab.mister-muffin.de/josch/img2pdf"
10 depends=(python-pillow python-pikepdf)
11 makedepends=(python-build python-installer python-setuptools python-wheel)
12 checkdepends=(python-pytest python-numpy python-scipy python-lxml
13 colord ghostscript imagemagick mupdf-tools openjpeg2 poppler perl-image-exiftool netpbm)
14 source=(https://files.pythonhosted.org/packages/source/i/${pkgname}/${pkgname}-${pkgver}.tar.gz)
15 sha256sums=('8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c')
18 cd ${pkgname}-${pkgver}
19 python -m build --wheel --no-isolation
23 cd ${pkgname}-${pkgver}
24 # Different output on Arch?
25 sed -e 's|Joint Photographic Experts Group JFIF format|JPEG|g' \
26 -e 's|JPEG-2000 File Format Syntax|JP2|g' \
27 -e 's|Portable Network Graphics|PNG|g' \
28 -e 's|Tagged Image File Format|TIFF|g' \
29 -e 's|CompuServe graphics interchange format|GIF|g' \
30 -i src/img2pdf_test.py
31 sed 's|usr/share/color/icc/sRGB.icc|usr/share/color/icc/colord/sRGB.icc|g' -i src/img2pdf_test.py
33 pytest -vv --color=yes || echo "Tests failed"
37 cd ${pkgname}-${pkgver}
38 python -m installer --destdir="$pkgdir" dist/*.whl