Browse Source

[trunk] -> [extra] 'cups-pdf-3.0.1-6' add

master
alium 8 months ago
parent
commit
6c32cd1180
No known key found for this signature in database GPG Key ID: 7FB6B7C6B7DAD63D
  1. 52
      cups-pdf/x86_64/extra/PKGBUILD
  2. 16
      cups-pdf/x86_64/extra/cups-pdf.install
  3. 25
      cups-pdf/x86_64/extra/remove-deprecated-ghostscript-setpdfwrite-operator.diff

52
cups-pdf/x86_64/extra/PKGBUILD

@ -0,0 +1,52 @@
# Maintainer: Andreas Radke <andyrtr at archlinux.org>
# Contributor: Thomas Baechler <thomas.baechler@rwth-aachen.de>
pkgname=cups-pdf
pkgver=3.0.1
pkgrel=6
pkgdesc="PDF printer for cups"
arch=(x86_64)
depends=('cups' 'ghostscript')
install=cups-pdf.install
url="https://www.cups-pdf.de/welcome.shtml"
license=('GPL2')
source=(https://www.cups-pdf.de/src/cups-pdf_$pkgver.tar.gz
remove-deprecated-ghostscript-setpdfwrite-operator.diff)
backup=(etc/cups/cups-pdf.conf)
# http://www.cups-pdf.de/src/cups-pdf_3.0.1.tar.gz.md5 - no other checksums
md5sums=('5071bf192b9c6eb5ada4337b6917b939'
'08eb1f7037ec8c6197437204d533db22')
prepare() {
cd "$pkgname-$pkgver"
# remove unsupported ghostscript operator - FS#70313
patch -Np1 -i ../remove-deprecated-ghostscript-setpdfwrite-operator.diff
}
build() {
cd "$pkgname-$pkgver"/src
[ -z "$CC" ] && CC=gcc
# $CC $CFLAGS -Wall -o cups-pdf cups-pdf.c
$CC $CFLAGS $LDFLAGS -s cups-pdf.c -o cups-pdf -lcups
}
package() {
cd "$pkgname-$pkgver"/src
install -D -m700 cups-pdf "$pkgdir"/usr/lib/cups/backend/cups-pdf
# Install Postscript Color printer
cd ../extra
install -D -m644 CUPS-PDF_noopt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_noopt.ppd
install -D -m644 CUPS-PDF_opt.ppd "$pkgdir"/usr/share/cups/model/CUPS-PDF_opt.ppd
# Install config file
install -D -m644 cups-pdf.conf "$pkgdir"/etc/cups/cups-pdf.conf
# Install docs
install -D -m 644 ../README "$pkgdir"/usr/share/doc/$pkgname/README
# use cups group from cups pkg FS#57311/FS#56818/FS#57313
chgrp -R cups "${pkgdir}"/etc/cups
sed -i "s:### Default\: lp:### Default\: cups:" "${pkgdir}"/etc/cups/cups-pdf.conf
sed -i "s:#Grp lp:Grp cups:" "${pkgdir}"/etc/cups/cups-pdf.conf
}

16
cups-pdf/x86_64/extra/cups-pdf.install

@ -0,0 +1,16 @@
post_install() {
cat << "EOF"
-------------------------------------------------
To use cups-pdf, restart cups and visit the cups
web interface at http://localhost:631/
You can now add a "Virtual Printer (PDF Printer)"
and use the Postscript/Generic postscript color
printer driver.
Note that cups-pdf has a configuration
file in /etc/cups. The default location for
pdf output is /var/spool/cups-pdf/$username.
-------------------------------------------------
EOF
}

25
cups-pdf/x86_64/extra/remove-deprecated-ghostscript-setpdfwrite-operator.diff

@ -0,0 +1,25 @@
--- cups-pdf-3.0.1/src/cups-pdf.h 2017-02-24 16:31:00.901661190 +0100
+++ cups-pdf-3.0.1/src/cups-pdf.h.new 2021-04-06 17:05:57.553854742 +0200
@@ -58,7 +58,7 @@
{ "AnonDirName", SEC_CONF|SEC_PPD, { "/var/spool/cups-pdf/ANONYMOUS" } },
{ "AnonUser", SEC_CONF|SEC_PPD, { "nobody" } },
{ "GhostScript", SEC_CONF|SEC_PPD, { "/usr/bin/gs" } },
- { "GSCall", SEC_CONF|SEC_PPD, { "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s" } },
+ { "GSCall", SEC_CONF|SEC_PPD, { "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s" } },
{ "Grp", SEC_CONF|SEC_PPD, { "lp" } },
{ "GSTmp", SEC_CONF|SEC_PPD, { "TMPDIR=/var/tmp" } },
{ "Log", SEC_CONF|SEC_PPD, { "/var/log/cups" } },
--- cups-pdf-3.0.1/extra/cups-pdf.conf 2017-02-24 16:30:18.476524443 +0100
+++ cups-pdf-3.0.1/extra/cups-pdf.conf.new 2021-04-06 17:06:26.364602843 +0200
@@ -250,9 +250,9 @@
### Key: GSCall (config)
## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
## MacOSX: for using pstopdf set this to %s %s -o %s %s
-### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
+### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s
-#GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
+#GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c -f %s
### Key: PDFVer (config, ppd, lptopions)
## PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2"
Loading…
Cancel
Save