upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / img2pdf / trunk / PKGBUILD
blob98be18eddeaba221d4a7395dd314e5ded5c52b9f
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 pkgname=img2pdf
4 pkgver=0.4.4
5 pkgrel=5
6 pkgdesc="Losslessly convert raster images to PDF"
7 arch=(any)
8 url="https://gitlab.mister-muffin.de/josch/img2pdf"
9 license=(LGPL3)
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')
17 build() {
18     cd ${pkgname}-${pkgver}
19     python -m build --wheel --no-isolation
22 check() {
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
32     # Failures with depth
33     pytest -vv --color=yes || echo "Tests failed"
36 package() {
37     cd ${pkgname}-${pkgver}
38     python -m installer --destdir="$pkgdir" dist/*.whl