Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Contributor: holos
- # Contributor: Michael Witten <mfwitten>
- # Contributor: Vladimir Gorbunov <zaza>
- # Contributor: Earnest
- # Contributor: Attila Toth <menta>
- # Contributor: Flu
- pkgname=llpp-git
- pkgver=25.r47.g1c57ca7
- pkgrel=1
- pkgdesc='Fast, featureful PDF viewer based on MuPDF.'
- arch=('i686' 'x86_64')
- url="http://repo.or.cz/w/llpp.git"
- license=('custom')
- provides=('llpp')
- conflicts=('llpp')
- depends=('mupdf' 'freetype2' 'jbig2dec' 'openjpeg2'
- 'libgl' 'libjpeg-turbo' 'glu' 'desktop-file-utils')
- makedepends=('git' 'libmupdf' 'mupdf>=1.7' 'ocaml>=4.02')
- source=('git://repo.or.cz/llpp.git')
- sha256sums=('SKIP')
- install=llpp.install
- # Dictionary lookup: http://repo.or.cz/llpp.git/commit/29916e0cadcdf0ee3136fc3b4655b3c8b0d01a7b
- optdepends=(
- 'xsel: text selection'
- 'xclip: text selection'
- 'sdcv: dictionary lookup'
- 'rofi: dictionary lookup'
- 'adobe-source-code-pro-fonts: recommended font for dictionary lookup presentation (any font can be used)'
- 'wget: llppac fetch remote urls (preferred)'
- 'curl: llppac fetch remote urls (alternative)'
- 'xz: llppac xz archives'
- 'djvulibre: llppac djvu conversion'
- 'ghostscript: llppac postscript, dvi, and djvu conversion'
- 'princexml: llppac html conversion'
- 'unoconv: llppac office document conversion'
- 'antiword: llppac .doc conversion (alternative)'
- 'inkscape: llppac svg conversion (preferred)'
- 'librsvg: llppac svg conversion (alternative)'
- 'imagemagick: llppac image conversion'
- 'pango: llppac font conversion'
- 'pandoc: llppac text conversion'
- )
- options=('!strip')
- pkgver() {
- cd llpp
- git describe --tags | sed 's/^v//;s/-/.r/;s/-/./'
- }
- build() {
- cd llpp
- sed -i -e 's+-I \$srcdir/mupdf/include -I \$srcdir/mupdf/thirdparty/freetype/include+-I /usr/include/freetype2+' build.sh
- sed -i -e 's+-lmupdfthird+-lmupdfthird -lz -lfreetype -ljpeg -ljbig2dec -lopenjp2+' build.sh
- sed -i -e 's+-L\$srcdir/mupdf/build/native ++' build.sh
- # Eliminate build errors
- # ./link.c:1669:13: error: implicit declaration of function ‘fz_set_use_document_css’ [-Wimplicit-function-declaration]
- sed -i -e 's+fz_set_use_document_css (state.ctx, usedoccss);+/* fz_set_use_document_css (state.ctx, usedoccss); */+' link.c
- # /usr/lib/libharfbuzz.so.0: error adding symbols: DSO missing from command line
- sed -i -e 's+-lcrypto+-lcrypto -lharfbuzz+' build.sh
- sh build.sh build/
- # shell completion
- cd "$srcdir/llpp/misc/completions"
- make
- }
- package() {
- cd "$srcdir/llpp"
- # llpp
- install -Dm755 build/llpp "$pkgdir/usr/bin/llpp"
- # license
- install -Dm644 README "$pkgdir/usr/share/licenses/llpp-git/README"
- cd "$srcdir/llpp/misc"
- # desktop integration
- install -Dm644 llpp.desktop "$pkgdir/usr/share/applications/llpp.desktop"
- # helper scripts
- install -Dm755 dicx "$pkgdir/usr/bin/dicx"
- install -Dm755 dllpp "$pkgdir/usr/bin/dllpp"
- install -Dm755 llppac "$pkgdir/usr/bin/llppac"
- install -Dm755 gc.awk "$pkgdir/usr/bin/gc.awk"
- # custom key bindings
- # https://wiki.archlinux.org/index.php/Llpp#Custom_key_bindings
- install -Dm644 keys.txt "$pkgdir/usr/share/llpp-git/keys.txt"
- # CSS styles
- install -Dm644 epub.css "$pkgdir/usr/share/llpp-git/epub.css"
- install -Dm644 prince.css "$pkgdir/usr/share/llpp-git/prince.css"
- # Wikipedia
- install -Dm644 wikipedia/wiki2.css "$pkgdir/usr/share/llpp-git/wiki2.css"
- install -Dm755 wikipedia/wpget "$pkgdir/usr/share/llpp-git/wpget"
- # shell completion
- install -Dm644 completions/bash/llpp "$pkgdir/usr/share/bash-completion/completions/llpp"
- install -Dm644 completions/bash/llppac "$pkgdir/usr/share/bash-completion/completions/llppac"
- install -Dm644 completions/zsh/llpp "$pkgdir/usr/share/zsh/site-functions/_llpp"
- install -Dm644 completions/zsh/llppac "$pkgdir/usr/share/zsh/site-functions/_llppac"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement