archrelease: copy trunk to extra-x86_64
[arch-packages.git] / cups-pdf / trunk / PKGBUILD
blobce2dc5b51f3ba5984dbc6005ba6af707a1bfd686
1 # Maintainer: Andreas Radke <andyrtr at archlinux.org>
2 # Contributor: Thomas Baechler <thomas.baechler@rwth-aachen.de>
4 pkgname=cups-pdf
5 pkgver=3.0.1
6 pkgrel=6
7 pkgdesc="PDF printer for cups"
8 arch=(x86_64)
9 depends=('cups' 'ghostscript')
10 install=cups-pdf.install
11 url="https://www.cups-pdf.de/welcome.shtml"
12 license=('GPL2')
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')
20 prepare() {
21   cd "$pkgname-$pkgver"
22   # remove unsupported ghostscript operator - FS#70313
23   patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
24 }  
26 build() {
27   cd "$pkgname-$pkgver"/src
28   [ -z "$CC" ] && CC=gcc
29 #  $CC $CFLAGS -Wall -o cups-pdf cups-pdf.c
30   $CC $CFLAGS $LDFLAGS -s cups-pdf.c -o cups-pdf -lcups  
33 package() {
34   cd "$pkgname-$pkgver"/src
35   install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
37   # Install Postscript Color printer
38   cd ../extra
39   install -D -m644 CUPS-PDF_noopt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_noopt.ppd
40   install -D -m644 CUPS-PDF_opt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_opt.ppd
42   # Install config file
43   install -D -m644 cups-pdf.conf "$pkgdir"/etc/cups/cups-pdf.conf
45   # Install docs
46   install -D -m 644 ../README "$pkgdir"/usr/share/doc/$pkgname/README
47   
48   # use cups group from cups pkg FS#57311/FS#56818/FS#57313
49   chgrp -R cups "${pkgdir}"/etc/cups
50   sed -i "s:### Default\: lp:### Default\: cups:" "${pkgdir}"/etc/cups/cups-pdf.conf
51   sed -i "s:#Grp lp:Grp cups:" "${pkgdir}"/etc/cups/cups-pdf.conf