1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Contributor: Miguel Revilla <yo at miguelrevilla.com>
3 # Contributor: David Sotelo <dvsotelo at gmail.com>
4 # Contributor: Nuno Araujo <nuno.araujo@russo79.com>
7 pkgname=('qpdf' 'qpdf-docs')
10 pkgdesc="QPDF: A Content-Preserving PDF Transformation System"
12 url="https://github.com/qpdf/qpdf"
13 license=('custom:Artistic-2.0' 'Apache')
14 makedepends=('libjpeg-turbo' 'zlib' 'gnutls' 'cmake'
15 'texlive-bin' 'texlive-core' 'python-sphinx' 'python-sphinx_rtd_theme' 'texlive-latexextra')
16 # https://github.com/qpdf/qpdf/releases/download/v11.1.1/qpdf-11.1.1.sha256
17 source=(#https://github.com/qpdf/qpdf/releases/download/release-${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz{,.asc}
18 https://github.com/qpdf/qpdf/releases/download/v$pkgver/${pkgname}-${pkgver}.tar.gz{,.asc})
19 sha256sums=('25e8ec60e290cd134405a51920015b6d351d4e0b93b7b736d257f10725f74b5a'
21 validpgpkeys=('C2C96B10011FE009E6D1DF828A75D10998012C7E') # "Jay Berkenbilt <ejb@ql.org>"
23 # howto build the docs:
24 # https://github.com/qpdf/qpdf/blob/main/build-scripts/build-doc
27 cd ${pkgbase}-${pkgver}
29 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
30 -D BUILD_STATIC_LIBS:BOOL=OFF \
31 -D REQUIRE_CRYPTO_GNUTLS:BOOL=ON \
32 -D REQUIRE_CRYPTO_OPENSSL:BOOL=OFF \
33 -D ENABLE_QTC:BOOL=ON \
39 cd ${pkgbase}-${pkgver}
44 depends=('libjpeg-turbo' 'zlib' 'gnutls')
46 cd ${pkgbase}-${pkgver}
47 make -C build DESTDIR="${pkgdir}" install
49 install -Dm644 completions/bash/qpdf "${pkgdir}/usr/share/bash-completion/completions/qpdf"
50 install -Dm644 completions/zsh/_qpdf "${pkgdir}/usr/share/zsh/site-functions/_qpdf"
52 rm -rf "${pkgdir}"/usr/share/doc
54 mkdir -m755 -p "${pkgdir}"/usr/share/licenses/${pkgbase}
55 install -m644 {Artistic-2.0,LICENSE.txt} "${pkgdir}"/usr/share/licenses/${pkgbase}/
59 pkgdesc+=" (documentation)"
61 cd ${pkgbase}-${pkgver}
62 mkdir -m755 -p "${pkgdir}"/usr/share/doc/qpdf/singlehtml
63 pushd build/manual/doc-dist
64 cp -a manual-single-page-html/* "${pkgdir}"/usr/share/doc/qpdf/singlehtml/
65 install -Dm644 qpdf-manual.pdf "${pkgdir}"/usr/share/doc/qpdf/qpdf-manual.pdf
67 make -C build/examples DESTDIR="${pkgdir}" install