summaryrefslogtreecommitdiffstats
path: root/main/cups-filters/APKBUILD
blob: 8971a882a86a38ba150be3a6f33887dcb0daad68 (plain)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cups-filters
pkgver=1.0.54
pkgrel=2
pkgdesc="OpenPrinting CUPS filters and backends"
url="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdf_as_standard_print_job_format"
arch="all"
license="GPLv2 and GPLv2+ and GPLv3 and MIT"
# textonly is a bash script
# texttops/textopdf need FreeMono from ttf-freefont
# for text printing to work
depends="poppler-utils bc bash ttf-freefont"
depends_dev=""
makedepends="$depends_dev cups-dev libjpeg-turbo-dev poppler-dev zlib-dev
	libpng-dev tiff-dev lcms-dev freetype-dev ghostscript-dev fontconfig-dev
	qpdf-dev avahi-dev dbus-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="http://www.openprinting.org/download/cups-filters/cups-filters-$pkgver.tar.xz"

_builddir="$srcdir"/cups-filters-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--with-pdftops=pdftops \
		--without-rcdir \
		--without-rclevels \
		|| return 1
	# workaround parallel build issue by building libcupsfilters.la first
	make libcupsfilters.la && make libfontembed.la && make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	#the pdf.utf-8 symlink isn't quite good enough
	cd "$pkgdir"/usr/share/cups/charsets && \
	ln -s pdf.utf-8.simple pdf.UTF-8 || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

dev() {
	default_dev
	# cupsfilters.drv needs pcl.h
	install -Dm644 "$_builddir"/filter/pcl.h \
		"$pkgdir"/usr/share/cups/ppdc/pcl.h
}

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/
}

md5sums="181ee0e6c27cfbb05e241f0267363678  cups-filters-1.0.54.tar.xz"
sha256sums="f9a58cc9f02f2257727248a71b99a74e6ef79e2e8527ef58bcd81e6154bc0966  cups-filters-1.0.54.tar.xz"
sha512sums="eee17f9fbc82f70857123ad62683e7136408f6888b7b666b3a787863c855fc00436d222fa2996cacedcc7245b24d9f08e9110cad8a7d17ca8e37e2210f86aab2  cups-filters-1.0.54.tar.xz"