APKBUILD 2.27 KB
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2
pkgname=cups-filters
3
pkgver=1.25.0
4
pkgrel=0
5
pkgdesc="OpenPrinting CUPS filters and backends"
6
url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
7
arch="all"
8
license="GPL-2.0-or-later LGPL-2.1-or-later MIT"
9 10 11 12 13
# while textonly is originally a bash script, it only needs a few changes
# to work with any shell (dash being the problematic one)
# foomatic-rip needs "a modern shell" in case the PPD requires some
# newer constructs; bash, ksh, and zsh are documented as working,
# and busybox ash supports most of what bash does
14 15
# texttops/textopdf need FreeMono from ttf-freefont
# for text printing to work
16
depends="poppler-utils bc ttf-freefont ghostscript"
Leo's avatar
Leo committed
17
makedepends="bash cups-dev libjpeg-turbo-dev poppler-dev zlib-dev
18 19 20
	libpng-dev tiff-dev lcms2-dev freetype-dev ghostscript-dev
	fontconfig-dev qpdf-dev avahi-dev dbus-dev linux-headers mupdf-tools
	coreutils"
Leo's avatar
Leo committed
21
checkdepends="ttf-dejavu"
22
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
23
source="https://github.com/OpenPrinting/cups-filters/releases/download/release-${pkgver//./-}/cups-filters-$pkgver.tar.xz
24
	"
25 26

build() {
27 28 29 30
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
31 32 33 34 35 36
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--with-pdftops=pdftops \
37
		--with-shell=/bin/sh \
38
		--without-rcdir \
Leo's avatar
Leo committed
39 40
		--without-rclevels \
		--with-test-font-path=/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf
41
	# workaround parallel build issue by building libcupsfilters.la first
42
	make libcupsfilters.la && make libfontembed.la && make
43 44
}

Leo's avatar
Leo committed
45 46 47 48
check() {
	make check
}

49
package() {
50
	make -j1 DESTDIR="$pkgdir" install
51 52
	#the pdf.utf-8 symlink isn't quite good enough
	cd "$pkgdir"/usr/share/cups/charsets && \
53
	ln -s pdf.utf-8.simple pdf.UTF-8
54 55
}

56 57 58
dev() {
	default_dev
	# cupsfilters.drv needs pcl.h
59
	install -Dm644 "$builddir"/filter/pcl.h \
60 61 62
		"$pkgdir"/usr/share/cups/ppdc/pcl.h
}

63 64 65 66 67 68
libs() {
	pkgdesc="OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
}

69
sha512sums="f1be31721fd8f6192868e7954d94038ff1382bb0194bb64014da3dd695cbbd2cd5d65373d809e1b541071374b7eabb44c68c6be29575251490d76a0a5336a5c5  cups-filters-1.25.0.tar.xz"