db-move: moved grilo-plugins from [staging] to [testing] (x86_64)
[arch-packages.git] / cups-filters / trunk / PKGBUILD
blobae3bfcb3400a87c8215673807157a68563b5c4d6
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=cups-filters
4 pkgver=1.28.17
5 pkgrel=2
6 pkgdesc="OpenPrinting CUPS Filters"
7 arch=('x86_64')
8 url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
9 license=('custom')
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')
26 build() {
27   # qpdf 11.3.0 buildfix - https://github.com/OpenPrinting/cups-filters/issues/512
28   CXXFLAGS+=" -std=c++17"
30   cd "$pkgname"-$pkgver
31   ./configure --prefix=/usr  \
32     --sysconfdir=/etc \
33     --sbindir=/usr/bin \
34     --localstatedir=/var \
35     --with-rcdir=no \
36     --enable-avahi \
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
40   make
43 check() {
44   cd "$pkgname"-$pkgver
45   make check
48 package() {
49   cd "$pkgname"-$pkgver
50   make DESTDIR="$pkgdir/" install
51   
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
56   
57   # use cups group from cups pkg FS#56818
58   chgrp -R 209 "${pkgdir}"/etc/cups
60   # license
61   mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
62   install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/