1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
4 _commit=378a821080ecb140a1319ee2be4cacc1150e82d6 # master 2020-11-16
5 pkgver=1.27.5+260+g378a8210
7 pkgdesc="OpenPrinting CUPS Filters"
9 url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
11 depends=('lcms2' 'poppler' 'qpdf' 'imagemagick' 'liblouis' 'ijs' 'libcups' 'systemd')
12 makedepends=('ghostscript' 'ttf-dejavu' 'python' 'mupdf-tools' 'psutils' 'git') # 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 'antiword: to convert MS Word documents'
18 'docx2txt: to convert Microsoft OOXML text from DOCX files')
19 backup=(etc/cups/cups-browsed.conf)
20 #source=(https://www.openprinting.org/download/cups-filters/$pkgname-$pkgver.tar.xz)
21 source=("git+https://github.com/OpenPrinting/cups-filters#commit=$_commit"
24 '4dcb21b719df28f1b275aef091014420dce2b57fbb1dacabd1eb067167629bd0')
28 #git describe --tags | sed 's/-/+/g' | sed 's/v//'
29 git describe --tags | sed 's/release-1-27-5/1.27.5/;s/-/+/g'
30 #git rev-list --count HEAD # = 25
31 #printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" # 0.r25.2e43897
36 patch -Np1 -i ../buildfix.diff
41 cd "$pkgname" #-$pkgver
42 ./configure --prefix=/usr \
45 --localstatedir=/var \
48 --with-browseremoteprotocols=DNSSD,CUPS \
49 --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
51 # make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | grep ^install
54 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
59 cd "$pkgname" #-$pkgver
64 cd "$pkgname" #-$pkgver
65 make DESTDIR="$pkgdir/" install
67 # add upstream systemd support file
68 install -Dm644 utils/cups-browsed.service "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
69 sed -i "s|/usr/sbin/cups-browsed|/usr/bin/cups-browsed|" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
71 # use cups group from cups pkg FS#56818
72 chgrp -R 209 "${pkgdir}"/etc/cups
75 mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
76 #install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
77 install -m644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/