aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mupdf/APKBUILD
blob: ebab4880c3fd28e7963f9829410665c18d9ecb3e (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=mupdf
pkgver=1.8
pkgrel=0
pkgdesc="A lightweight PDF and XPS viewer"
url="http://mupdf.com"
arch="all"
license="GPL3+"
depends=""
makedepends="freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev
	openjpeg-dev"
install=""
subpackages="$pkgname-doc $pkgname-dev"
source="http://mupdf.com/downloads/mupdf-${pkgver}-source.tar.gz
	mupdf-openjpeg-2.1.patch
	shared-lib.patch
	"

_builddir="$srcdir/$pkgname-${pkgver}-source"
prepare() {
	cd "$_builddir"

	rm -rf thirdparty
	sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' -i Makethird

	local i=
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 ;;
		esac
	done
}

build() {
	cd "$_builddir"
	make prefix=/usr || return 1
}

package() {
	cd "$_builddir"
	make prefix=/usr DESTDIR="$pkgdir" install || return 1

	ln -s libmupdf.so.0 "$pkgdir"/usr/lib/libmupdf.so

	# Create symlink
	ln -s /usr/bin/$pkgname-x11 "$pkgdir"/usr/bin/$pkgname
}

md5sums="3205256d78d8524d67dd2a47c7a345fa  mupdf-1.8-source.tar.gz
4a8772b09af5152d9bf58e69834b74bf  mupdf-openjpeg-2.1.patch
fab3502b8bcf3b6c4e5698f1cb33611d  shared-lib.patch"
sha256sums="a2a3c64d8b24920f87cf4ea9339a25abf7388496440f13b37482d1403c33c206  mupdf-1.8-source.tar.gz
7b49af879df5eb2c79884a0983635fa335422edc9854bc4fbc44f653892827f2  mupdf-openjpeg-2.1.patch
43c6a6ea06757e63ae581be89338f38ec22beb504ca6e5ee3073ef1585aabe01  shared-lib.patch"
sha512sums="938fbed4afc0dd0aa621911cd70b9289c6a4f13d026f9390b11fc86d5b37845a76943c9fa42f218f67fe298295f15d6664a18be7bf73b5d952724122510f9deb  mupdf-1.8-source.tar.gz
0a07dc0a0312ef0b6a20f6a89da7a2010008cf804a1c9b33667b17f263a69e46047a34dcb24e8015a98a61e28e1e302dc302c0fbb7303a61b00d9490146b7b83  mupdf-openjpeg-2.1.patch
66bc7474473987a30009e54fbd12b49cb6682f12c86f5d9b9e6f6efd4c162d04d55a65f9d8373517e958951608c9e49eade8b63b140441c04ad2e75eebb8f053  shared-lib.patch"