archrelease: copy trunk to extra-x86_64
[arch-packages.git] / cups-filters / trunk / PKGBUILD
blob5e533f91d935e9d9c602e10ef98f2571272703b9
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=cups-filters
4 pkgver=1.28.15
5 pkgrel=1
6 pkgdesc="OpenPrinting CUPS Filters"
7 arch=('x86_64')
8 url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
9 license=('custom')
10 depends=('lcms2' 'poppler' 'qpdf' 'imagemagick' 'liblouis' 'ijs' 'libcups>=2.2.6-2' 'systemd')
11 makedepends=('ghostscript' 'python' 'mupdf-tools')
12 checkdepends=('ttf-dejavu') # ttf-dejavu for make check
13 optdepends=('ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images'
14             'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly'
15             'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly'
16             'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly'
17             'antiword: to convert MS Word documents'
18             'docx2txt: to convert Microsoft OOXML text from DOCX files')
19 backup=(etc/cups/cups-browsed.conf)
20 source=(https://www.openprinting.org/download/cups-filters/$pkgname-$pkgver.tar.xz)
21 sha256sums=('a907ec769fbb72efbfbf9b540b250a08e33b6e373a8a7c343f9840fba4d0478b')
23 build() {
24   cd "$pkgname"-$pkgver
25   ./configure --prefix=/usr  \
26     --sysconfdir=/etc \
27     --sbindir=/usr/bin \
28     --localstatedir=/var \
29     --with-rcdir=no \
30     --enable-avahi \
31     --with-browseremoteprotocols=DNSSD,CUPS \
32     --enable-auto-setup-driverless \
33     --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
34   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
35   make
38 check() {
39   cd "$pkgname"-$pkgver
40   make check
43 package() {
44   cd "$pkgname"-$pkgver
45   make DESTDIR="$pkgdir/" install
46   
47   # add upstream systemd support file
48   install -Dm644 utils/cups-browsed.service "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
49   sed -i "s|/usr/sbin/cups-browsed|/usr/bin/cups-browsed|" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
50   #sed -i "s|cups.service|org.cups.cupsd.service|g" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
51   
52   # use cups group from cups pkg FS#56818
53   chgrp -R 209 "${pkgdir}"/etc/cups
55   # license
56   mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
57   install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/