1 # Maintainer: Andreas Radke <andyrtr at archlinux.org>
2 # Contributor: Thomas Baechler <thomas.baechler@rwth-aachen.de>
7 pkgdesc="PDF printer for cups"
9 depends=('cups' 'ghostscript')
10 install=cups-pdf.install
11 url="https://www.cups-pdf.de/welcome.shtml"
13 source=(https://www.cups-pdf.de/src/cups-pdf_$pkgver.tar.gz
14 remove-deprecated-ghostscript-setpdfwrite-operator.diff)
15 backup=(etc/cups/cups-pdf.conf)
16 # http://www.cups-pdf.de/src/cups-pdf_3.0.1.tar.gz.md5 - no other checksums
17 md5sums=('5071bf192b9c6eb5ada4337b6917b939'
18 '08eb1f7037ec8c6197437204d533db22')
19 sha256sums=('738669edff7f1469fe5e411202d87f93ba25b45f332a623fb607d49c59aa9531'
20 '8429e8329ac8b10dd28bd1f5693cf3b0eb7461a62183440c319430c999ab8cbd')
24 # remove unsupported ghostscript operator - FS#70313
25 patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
29 cd "$pkgname-$pkgver"/src
30 [ -z "$CC" ] && CC=gcc
31 # $CC $CFLAGS -Wall -o cups-pdf cups-pdf.c
32 $CC $CFLAGS $LDFLAGS -s cups-pdf.c -o cups-pdf -lcups
36 cd "$pkgname-$pkgver"/src
37 install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
39 # Install Postscript Color printer
41 install -D -m644 CUPS-PDF_noopt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_noopt.ppd
42 install -D -m644 CUPS-PDF_opt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_opt.ppd
45 install -D -m644 cups-pdf.conf "$pkgdir"/etc/cups/cups-pdf.conf
48 install -D -m 644 ../README "$pkgdir"/usr/share/doc/$pkgname/README
50 # use cups group from cups pkg FS#57311/FS#56818/FS#57313
51 chgrp -R cups "${pkgdir}"/etc/cups
52 sed -i "s:### Default\: lp:### Default\: cups:" "${pkgdir}"/etc/cups/cups-pdf.conf
53 sed -i "s:#Grp lp:Grp cups:" "${pkgdir}"/etc/cups/cups-pdf.conf