1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
6 pkgdesc="OpenPrinting CUPS Filters"
8 url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
10 depends=('lcms2' 'poppler' 'qpdf' 'ijs' 'libcups>=2.2.6-2' 'systemd' 'libexif')
11 makedepends=('ghostscript' 'python' 'mupdf-tools' 'liblouis')
12 checkdepends=('ttf-dejavu') # ttf-dejavu for make check
13 optdepends=('ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images'
14 'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly'
15 'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly'
16 'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly'
17 'imagemagick: for Braille embosser support'
18 'liblouis: for Braille embosser support'
19 'antiword: to convert MS Word documents for Braille embosser support'
20 'docx2txt: to convert Microsoft OOXML text from DOCX files for Braille embosser support')
21 backup=(etc/cups/cups-browsed.conf)
22 source=(#https://www.openprinting.org/download/cups-filters/$pkgname-$pkgver.tar.xz
23 https://github.com/OpenPrinting/cups-filters/releases/download/$pkgver/$pkgname-$pkgver.tar.xz)
24 sha256sums=('270a3752a960368aa99d431fb5d34f4039b2ac943c576d840612d1d8185c9bb9')
27 # qpdf 11.3.0 buildfix - https://github.com/OpenPrinting/cups-filters/issues/512
28 CXXFLAGS+=" -std=c++17"
31 ./configure --prefix=/usr \
34 --localstatedir=/var \
37 --with-browseremoteprotocols=DNSSD,CUPS \
38 --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
39 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
50 make DESTDIR="$pkgdir/" install
52 # add upstream systemd support file
53 install -Dm644 utils/cups-browsed.service "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
54 sed -i "s|/usr/sbin/cups-browsed|/usr/bin/cups-browsed|" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
55 #sed -i "s|cups.service|org.cups.cupsd.service|g" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
57 # use cups group from cups pkg FS#56818
58 chgrp -R 209 "${pkgdir}"/etc/cups
61 mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
62 install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/