# Contributor: Sören Tempel # Maintainer: Michael Zhou pkgname=mupdf pkgver=1.7a 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="319fda2cc5301bb3ec2e1d82c3329986 mupdf-1.7a-source.tar.gz 4a8772b09af5152d9bf58e69834b74bf mupdf-openjpeg-2.1.patch fab3502b8bcf3b6c4e5698f1cb33611d shared-lib.patch" sha256sums="8c035ffa011fc44f8a488f70da3e6e51889508bbf66fe6b90a63e0cfa6c17d1c mupdf-1.7a-source.tar.gz 7b49af879df5eb2c79884a0983635fa335422edc9854bc4fbc44f653892827f2 mupdf-openjpeg-2.1.patch 43c6a6ea06757e63ae581be89338f38ec22beb504ca6e5ee3073ef1585aabe01 shared-lib.patch" sha512sums="5b8dc8146ef0aa652cc889b6470fc157287bb351cb0990216d5e891bdc4c1b287e0299b4291161938369df4b2591cb36a53ea415b7bd13b0c1415cb51b196ca7 mupdf-1.7a-source.tar.gz 0a07dc0a0312ef0b6a20f6a89da7a2010008cf804a1c9b33667b17f263a69e46047a34dcb24e8015a98a61e28e1e302dc302c0fbb7303a61b00d9490146b7b83 mupdf-openjpeg-2.1.patch 66bc7474473987a30009e54fbd12b49cb6682f12c86f5d9b9e6f6efd4c162d04d55a65f9d8373517e958951608c9e49eade8b63b140441c04ad2e75eebb8f053 shared-lib.patch"