PKGBUILD 3.42 KB
Newer Older
Eric Vidal's avatar
Eric Vidal committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Maintainer    : Eric Vidal <eric@obarun.org>
# Maintainer    : Jean-Michel T.Dydak <jean-michel@obarun.org>
# Maintainer    : YianIris <yianiris At disroot Dot org>
# Obarun PkgSrc : https://framagit.org/pkg/obextra/cups-filters/
#----------------
# Maintainer    : Andreas Radke <andyrtr@archlinux.org>
# Arch PkgSrc   : https://www.archlinux.org/packages/extra/x86_64/cups-filters/
#----------------
# Website       : https://wiki.linuxfoundation.org/openprinting/cups-filters/
#------------------------------------------------------------------------------
#--DESCRIPTION-----------------------------------------------------------------

pkgname=cups-filters

pkgdesc="OpenPrinting CUPS Filters"

pkgver=1.28.8
pkgrel=2

url="https://www.openprinting.org/download/cups-filters"

track=
target="$pkgname-$pkgver.tar.xz"
source=($url/$target
'buildfix.diff')

#--BUILD CONFIGURATION---------------------------------------------------------

makedepends=(
    'ghostscript'
    'ttf-dejavu'
    'python'
    'mupdf-tools') # ttf-dejavu for make check

#--BUILD CONTROL---------------------------------------------------------------

path=(
    --prefix=/usr
    --sysconfdir=/etc
    --sbindir=/usr/bin
    --localstatedir=/var
)

flags=(
    --with-rcdir=no
    --with-browseremoteprotocols=DNSSD,CUPS
    --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
    --enable-auto-setup-driverless
    --disable-avahi
)


#prepare() {
#   cd $pkgname-$pkgver
#   patch -Np1 -i ../buildfix.diff
#    autoreconf -vfi
#}

#--BUILD-----------------------------------------------------------------------

build() {
    cd $pkgname-$pkgver

    ./configure "${path[@]}" "${flags[@]}"
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
}

#--CHECK-----------------------------------------------------------------------

check() {
  cd $pkgname-$pkgver
  make check
}

#--PACKAGE---------------------------------------------------------------------

package() {
    cd $pkgname-$pkgver

    make DESTDIR="$pkgdir/" install

    ## use lp group from cups pkg FS#56818
    chgrp -R 209 ${pkgdir}/etc/cups

    ## license
    mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
    install -m644 "${srcdir}"/${pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
}

#--INSTALL CONFIGURATION-------------------------------------------------------

arch=(x86_64)

backup=(
    'etc/cups/cups-browsed.conf')

depends=(
    'lcms2'
    'poppler'
    'qpdf'
    'imagemagick'
    'liblouis'
    'ijs'
    'libcups>=2.2.6-2')

optdepends=(
    'ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images'
    'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly'
    'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly'
    'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly'
    'antiword: needed to convert MS Word documents (requires also docx2txt (AUR)'
    'docx2txt: to convert Microsoft OOXML text from DOCX files')

#--SECURITY AND LICENCE--------------------------------------------------------

license=('custom')

sha512sums=('77b39ce2a30ad44d50aa58964b389fa5dd75b2b4307ccb25996050fd176e1e794ad0a66ddd4de76e95a671683c3bf448a4f471272c97a752f25ff6234f7d8511'
	    '30d29e91538ba9934de9c95a662c4cd0f988cb3ba13a4bbc280e6a0840bdda694e0092383ad25bd74266e61ee2927dd5523ad47f7877d392c90321794899b5d4'
	   )