updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mupdf-patched / PKGBUILD
blobe60563414d7a48de47c1fa99815efe547f9c803c
1 # Maintainer: karabaja4 <karabaja4@archlinux.us>
3 pkgname=mupdf-patched
4 pkgver=0.9
5 pkgrel=1
6 pkgdesc="mupdf with sane scrolling hack, and a DPI detection hack."
7 arch=('i686' 'x86_64')
8 url="http://mupdf.com"
9 license=('GPL3')
10 depends=('freetype2' 'libjpeg' 'jbig2dec' 'openjpeg' 'libxext')
11 conflicts=('mupdf' 'mupdf-git')
12 install=mupdf.install
13 source=("http://mupdf.com/download/mupdf-$pkgver-source.tar.gz"
14         "scroll_hack.patch"
15         "dpi_hack.patch")
16 md5sums=('76640ee16a797a27fe49cc0eaa87ce3a'
17          '7719aaad7eade8153fd17e0d41e8f5eb'
18          'ede4f578c22a9a75e44ea84223c63016')
20 build() {
21         cd "$srcdir/mupdf-$pkgver"
22         
23         # Patch the scrolling
24         msg "Applying scroll patch..."
25         patch -p1 -i ../scroll_hack.patch
26         
27         # Patch the dpi
28         msg "Applying dpi patch..."
29         patch -p1 -i ../dpi_hack.patch
30         
31         make build=release prefix="$pkgdir/usr"
34 package() {
35         
36         # Install
37         cd "$srcdir/mupdf-$pkgver"
38         make build=release prefix="${pkgdir}/usr" install
40         # Rename executables
41         msg "Renaming executables"
42         cd "${pkgdir}/usr/bin"
43         for i in pdf*; do 
44                 mv "$i" "$i-mupdf";
45         done
47         cd "$srcdir/mupdf-$pkgver"
48         # Fix mupdf.desktop
49         sed -i "s/mupdf.xpm/mupdf/" debian/mupdf.desktop
50         sed -i "s/application\/x-pdf/application\/x-pdf/" debian/mupdf.desktop
52         # Install other stuff
53         cd "$srcdir/mupdf-$pkgver/debian"
54         install -Dm644 mupdf.desktop "$pkgdir/usr/share/applications/mupdf.desktop"
55         install -Dm644 mupdf.xpm "$pkgdir/usr/share/pixmaps/mupdf.xpm"