1.50.4-3: libplist 2.3.0
[arch-packages.git] / cups-pdf / trunk / PKGBUILD
blob31749056ab9908606979365bd7e5d28c56c9e1d4
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 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')
22 prepare() {
23   cd "$pkgname-$pkgver"
24   # remove unsupported ghostscript operator - FS#70313
25   patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
26 }  
28 build() {
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  
35 package() {
36   cd "$pkgname-$pkgver"/src
37   install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
39   # Install Postscript Color printer
40   cd ../extra
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
44   # Install config file
45   install -D -m644 cups-pdf.conf "$pkgdir"/etc/cups/cups-pdf.conf
47   # Install docs
48   install -D -m 644 ../README "$pkgdir"/usr/share/doc/$pkgname/README
49   
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