summaryrefslogtreecommitdiff
path: root/community/mupdf/PKGBUILD
blob: c20a92469eec4945bcfcb36044b2b1f4dccd5534 (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
# $Id: PKGBUILD 95688 2013-08-15 16:50:34Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Pierre-Paul Paquin <pierrepaulpaquin@gmail.com>
# Contributor: xduugu

pkgname=mupdf
pkgver=1.3
pkgrel=1
pkgdesc='Lightweight PDF and XPS viewer'
arch=('i686' 'x86_64')
url='http://mupdf.com'
license=('GPL3')
depends=('desktop-file-utils' 'libxext' 'openssl')
install=mupdf.install
source=(https://mupdf.googlecode.com/files/$pkgname-$pkgver-source.tar.gz)
sha256sums=('aba8b31bee9cc0a16abedab5e31c81c65996cba5591e62a50a79bea2a63d4478')

build() {
  CFLAGS+=' -fPIC'
  CXXFLAGS+=' -fPIC'

  cd $pkgname-$pkgver-source
  make build=release
}

package() {
  cd $pkgname-$pkgver-source
  make build=release prefix="$pkgdir"/usr install

  cd platform/debian
  sed -i 's/mupdf.xpm/mupdf/' mupdf.desktop
  sed -i 's/application\/x-pdf/application\/x-pdf/' mupdf.desktop
  install -Dm644 mupdf.desktop "$pkgdir"/usr/share/applications/mupdf.desktop
  install -Dm644 mupdf.xpm "$pkgdir"/usr/share/pixmaps/mupdf.xpm

  chmod 644 "$pkgdir"/usr/lib/libmupdf{,-js-none}.a
}