# Maintainer: AndyRTR # Contributor: Miguel Revilla # Contributor: David Sotelo # Contributor: Nuno Araujo # ALARM: Kevin Mihelich # - explicitly link v5/v6 with libatomic pkgname=qpdf pkgver=10.3.1 pkgrel=1 pkgdesc="QPDF: A Content-Preserving PDF Transformation System" arch=('x86_64') url="https://github.com/qpdf/qpdf" license=('custom:Artistic-2.0' 'Apache') depends=('libjpeg-turbo' 'zlib' 'gnutls') #optdepends=('perl: required for fix-qdf') #checkdepends=('perl') # https://github.com/qpdf/qpdf/releases/download/release-qpdf-10.3.1/qpdf-10.3.1.sha256 source=(#https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc}) https://github.com/qpdf/qpdf/releases/download/release-${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz{,.asc}) sha256sums=('d3e6b862098c6357d04390fd30d08c94aa2cf7a3bb2dcabd3846df5eb57367d6' 'SKIP') validpgpkeys=('C2C96B10011FE009E6D1DF828A75D10998012C7E') # "Jay Berkenbilt " build() { cd ${pkgname}-${pkgver} [[ $CARCH == "arm" || $CARCH == "armv6h" ]] && LIBS="-latomic" LIBS=$LIBS ./configure --prefix=/usr \ --disable-static \ --enable-crypto-gnutls \ --disable-crypto-openssl \ --disable-implicit-crypto \ --enable-show-failed-test-output sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } check() { cd ${pkgname}-${pkgver} make check # passes all } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}/" install install -Dm644 completions/bash/qpdf "${pkgdir}/usr/share/bash-completion/completions/qpdf" install -Dm644 completions/zsh/_qpdf "${pkgdir}/usr/share/zsh/site-functions/_qpdf" mkdir -m755 -p "${pkgdir}"/usr/share/licenses/${pkgname} install -m644 {Artistic-2.0,LICENSE.txt} "${pkgdir}"/usr/share/licenses/${pkgname}/ }