void-packages/srcpkgs/mupdf/template

58 lines
1.5 KiB
Text
Raw Normal View History

2013-11-17 19:45:22 +00:00
# Template file for 'mupdf'
pkgname=mupdf
2014-04-15 07:54:38 +00:00
version=1.4
2013-11-17 19:45:22 +00:00
revision=1
wrksrc="${pkgname}-${version}-source"
2014-04-15 07:54:38 +00:00
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel libjpeg-turbo-devel jbig2dec-devel"
2013-11-17 19:45:22 +00:00
makedepends="zlib-devel libcurl-devel freetype-devel libjpeg-turbo-devel jbig2dec-devel libXext-devel desktop-file-utils"
depends="desktop-file-utils"
2013-11-17 19:45:22 +00:00
short_desc="Lightweight PDF and XPS viewer"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-3"
homepage="http://mupdf.com"
2014-04-15 07:54:38 +00:00
distfiles="http://mupdf.com/downloads/mupdf-${version}-source.tar.gz"
checksum=018bab9520b5e93bb33ab07b0472fdf9f768c5801769f95b9a696941b633ec22
2013-11-17 19:45:22 +00:00
2014-04-15 07:54:38 +00:00
pre_configure() {
2013-11-17 19:45:22 +00:00
rm -rf thirdparty/{curl,freetype,jpeg,zlib,jbig2dec}
}
2014-04-15 07:54:38 +00:00
do_configure() {
if [ "$CROSS_BUILD" ]; then
unset CFLAGS
make CC=cc LD=ld AR=ar build=release generate
fi
}
2013-11-17 19:45:22 +00:00
do_build() {
2014-04-15 07:54:38 +00: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 19:45:22 +00: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
cd platform/debian
sed -i -e 's/mupdf.xpm/mupdf/' \
-e 's/application\/x-pdf/application\/x-pdf/' \
-e 's/mupdf-select-file/mupdf/' \
-e 's/^$/NoDisplay=true/' mupdf.desktop
vinstall mupdf.desktop 644 usr/share/applications
vinstall mupdf.xpm 644 usr/share/pixmaps
}
mupdf-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib
}
}