db-move: moved grilo-plugins from [staging] to [testing] (x86_64)
[arch-packages.git] / cups-filters / trunk / PKGBUILD.v20
blobee125b6dbd56161a339426c9a259a16c1b4fcbc0
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=cups-filters
4 _commit=378a821080ecb140a1319ee2be4cacc1150e82d6 # master 2020-11-16
5 pkgver=1.27.5+260+g378a8210
6 pkgrel=1
7 pkgdesc="OpenPrinting CUPS Filters"
8 arch=('x86_64')
9 url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
10 license=('custom')
11 depends=('lcms2' 'poppler' 'qpdf' 'imagemagick' 'liblouis' 'ijs' 'libcups' 'systemd')
12 makedepends=('ghostscript' 'ttf-dejavu' 'python' 'mupdf-tools' 'psutils' 'git') # 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 source=("git+https://github.com/OpenPrinting/cups-filters#commit=$_commit"
22         buildfix.diff)
23 sha256sums=('SKIP'
24             '4dcb21b719df28f1b275aef091014420dce2b57fbb1dacabd1eb067167629bd0')
26 pkgver() {
27   cd $pkgname
28   #git describe --tags | sed 's/-/+/g' | sed 's/v//'
29   git describe --tags | sed 's/release-1-27-5/1.27.5/;s/-/+/g'
30   #git rev-list --count HEAD # = 25
31   #printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" # 0.r25.2e43897
34 prepare() {
35   cd "$pkgname" 
36   patch -Np1 -i ../buildfix.diff
37   autoreconf -vfi
40 build() {
41   cd "$pkgname" #-$pkgver
42   ./configure --prefix=/usr  \
43     --sysconfdir=/etc \
44     --sbindir=/usr/bin \
45     --localstatedir=/var \
46     --with-rcdir=no \
47     --enable-avahi \
48     --with-browseremoteprotocols=DNSSD,CUPS \
49     --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
51 #  make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | grep ^install
52 #  return 1
54   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
55   make #V=1
58 check() {
59   cd "$pkgname" #-$pkgver
60   make check
63 package() {
64   cd "$pkgname" #-$pkgver
65   make DESTDIR="$pkgdir/" install
66   
67   # add upstream systemd support file
68   install -Dm644 utils/cups-browsed.service "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
69   sed -i "s|/usr/sbin/cups-browsed|/usr/bin/cups-browsed|" "${pkgdir}"/usr/lib/systemd/system/cups-browsed.service
70   
71   # use cups group from cups pkg FS#56818
72   chgrp -R 209 "${pkgdir}"/etc/cups
74   # license
75   mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
76   #install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
77   install -m644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/