52 lines
1.5 KiB
Bash
52 lines
1.5 KiB
Bash
# Template file for 'mupdf'
|
|
pkgname=mupdf
|
|
version=1.7a
|
|
revision=2
|
|
wrksrc="${pkgname}-${version}-source"
|
|
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel libjpeg-turbo-devel jbig2dec-devel"
|
|
makedepends="zlib-devel libressl-devel libcurl-devel freetype-devel libjpeg-turbo-devel jbig2dec-devel libXext-devel"
|
|
depends="desktop-file-utils"
|
|
short_desc="Lightweight PDF and XPS viewer"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="GPL-3"
|
|
homepage="http://mupdf.com"
|
|
distfiles="http://mupdf.com/downloads/mupdf-${version}-source.tar.gz"
|
|
checksum=8c035ffa011fc44f8a488f70da3e6e51889508bbf66fe6b90a63e0cfa6c17d1c
|
|
|
|
pre_configure() {
|
|
rm -rf thirdparty/{curl,freetype,jpeg,zlib,jbig2dec}
|
|
}
|
|
do_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
unset CFLAGS
|
|
make CC=cc LD=ld AR=ar build=release generate
|
|
fi
|
|
}
|
|
do_build() {
|
|
CFLAGS+=" -fPIC"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make CROSSCOMPILE=yes CURL_LIBS='-lcurl -lpthread' build=release
|
|
else
|
|
make CURL_LIBS='-lcurl -lpthread' build=release
|
|
fi
|
|
}
|
|
do_install() {
|
|
make build=release prefix=${DESTDIR}/usr install
|
|
|
|
mv ${DESTDIR}/usr/bin/mupdf-x11-curl ${DESTDIR}/usr/bin/mupdf
|
|
rm ${DESTDIR}/usr/bin/mupdf-x11
|
|
|
|
vinstall build/release/libmujs.a 644 usr/lib
|
|
|
|
vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
|
|
vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
|
|
}
|
|
|
|
mupdf-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libjpeg-turbo-devel jbig2dec-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib
|
|
}
|
|
}
|