void-packages/srcpkgs/mupdf/template

53 lines
1.5 KiB
Bash
Raw Normal View History

2013-11-17 20:45:22 +01:00
# Template file for 'mupdf'
pkgname=mupdf
2015-04-17 06:50:20 +02:00
version=1.7
revision=1
2013-11-17 20:45:22 +01:00
wrksrc="${pkgname}-${version}-source"
2014-04-15 09:54:38 +02:00
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"
2013-11-17 20:45:22 +01:00
short_desc="Lightweight PDF and XPS viewer"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
2013-11-17 20:45:22 +01:00
license="GPL-3"
homepage="http://mupdf.com"
2014-04-15 09:54:38 +02:00
distfiles="http://mupdf.com/downloads/mupdf-${version}-source.tar.gz"
2015-04-17 06:50:20 +02:00
checksum=d0bd5c656c464411cb5788c73d5a7c9a5b89f1e9e84e3c8c7c982ed8b90f5642
2013-11-17 20:45:22 +01:00
2014-04-15 09:54:38 +02:00
pre_configure() {
2013-11-17 20:45:22 +01:00
rm -rf thirdparty/{curl,freetype,jpeg,zlib,jbig2dec}
}
2014-04-15 09:54:38 +02:00
do_configure() {
if [ "$CROSS_BUILD" ]; then
unset CFLAGS
make CC=cc LD=ld AR=ar build=release generate
fi
}
2013-11-17 20:45:22 +01:00
do_build() {
2014-07-08 13:09:13 +02:00
CFLAGS+=" -fPIC"
2014-04-15 09:54:38 +02:00
if [ "$CROSS_BUILD" ]; then
make CROSSCOMPILE=yes CURL_LIBS='-lcurl -lpthread' build=release
else
make CURL_LIBS='-lcurl -lpthread' build=release
fi
2013-11-17 20:45:22 +01:00
}
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
2014-07-08 13:09:47 +02:00
vinstall build/release/libmujs.a 644 usr/lib
2014-06-12 23:06:39 +02:00
vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
2013-11-17 20:45:22 +01:00
}
mupdf-devel_package() {
short_desc+=" - development files"
depends="libjpeg-turbo-devel jbig2dec-devel"
2013-11-17 20:45:22 +01:00
pkg_install() {
vmove usr/include
vmove usr/lib
}
}