archrelease: copy trunk to extra-x86_64
[arch-packages.git] / cups-pdf / trunk / PKGBUILD
bloba3f03b98eeba49dc31ad4c16a9912b3aa41e3b4a
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=7
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 options=('debug')
14 source=(https://www.cups-pdf.de/src/cups-pdf_$pkgver.tar.gz
15         remove-deprecated-ghostscript-setpdfwrite-operator.diff)
16 backup=(etc/cups/cups-pdf.conf)
17 # http://www.cups-pdf.de/src/cups-pdf_3.0.1.tar.gz.md5 - no other checksums
18 md5sums=('5071bf192b9c6eb5ada4337b6917b939'
19          '08eb1f7037ec8c6197437204d533db22')
20 sha256sums=('738669edff7f1469fe5e411202d87f93ba25b45f332a623fb607d49c59aa9531'
21             '8429e8329ac8b10dd28bd1f5693cf3b0eb7461a62183440c319430c999ab8cbd')
23 prepare() {
24   cd "$pkgname-$pkgver"
25   # remove unsupported ghostscript operator - FS#70313
26   patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
27 }  
29 build() {
30   cd "$pkgname-$pkgver"/src
31   [ -z "$CC" ] && CC=gcc
32 #  $CC $CFLAGS -Wall -o cups-pdf cups-pdf.c
33   $CC $CFLAGS $LDFLAGS -s cups-pdf.c -o cups-pdf -lcups  
36 package() {
37   cd "$pkgname-$pkgver"/src
38   install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
40   # Install Postscript Color printer
41   cd ../extra
42   install -D -m644 CUPS-PDF_noopt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_noopt.ppd
43   install -D -m644 CUPS-PDF_opt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_opt.ppd
45   # Install config file
46   install -D -m644 cups-pdf.conf "$pkgdir"/etc/cups/cups-pdf.conf
48   # Install docs
49   install -D -m 644 ../README "$pkgdir"/usr/share/doc/$pkgname/README
50   
51   # use cups group from cups pkg FS#57311/FS#56818/FS#57313
52   chgrp -R cups "${pkgdir}"/etc/cups
53   sed -i "s:### Default\: lp:### Default\: cups:" "${pkgdir}"/etc/cups/cups-pdf.conf
54   sed -i "s:#Grp lp:Grp cups:" "${pkgdir}"/etc/cups/cups-pdf.conf