SHARE
TWEET

llpp-git PKGBUILD (2016-1215)

a guest Dec 15th, 2016 178 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Contributor: holos
  2. # Contributor: Michael Witten <mfwitten>
  3. # Contributor: Vladimir Gorbunov <zaza>
  4. # Contributor: Earnest
  5. # Contributor: Attila Toth <menta>
  6. # Contributor: Flu
  7.  
  8. pkgname=llpp-git
  9. pkgver=25.r47.g1c57ca7
  10. pkgrel=1
  11. pkgdesc='Fast, featureful PDF viewer based on MuPDF.'
  12. arch=('i686' 'x86_64')
  13. url="http://repo.or.cz/w/llpp.git"
  14. license=('custom')
  15. provides=('llpp')
  16. conflicts=('llpp')
  17. depends=('mupdf' 'freetype2' 'jbig2dec' 'openjpeg2'
  18.          'libgl' 'libjpeg-turbo' 'glu' 'desktop-file-utils')
  19. makedepends=('git' 'libmupdf' 'mupdf>=1.7' 'ocaml>=4.02')
  20. source=('git://repo.or.cz/llpp.git')
  21. sha256sums=('SKIP')
  22. install=llpp.install
  23. # Dictionary lookup: http://repo.or.cz/llpp.git/commit/29916e0cadcdf0ee3136fc3b4655b3c8b0d01a7b
  24. optdepends=(
  25.   'xsel: text selection'
  26.   'xclip: text selection'
  27.   'sdcv: dictionary lookup'
  28.   'rofi: dictionary lookup'
  29.   'adobe-source-code-pro-fonts: recommended font for dictionary lookup presentation (any font can be used)'
  30.   'wget: llppac fetch remote urls (preferred)'
  31.   'curl: llppac fetch remote urls (alternative)'
  32.   'xz: llppac xz archives'
  33.   'djvulibre: llppac djvu conversion'
  34.   'ghostscript: llppac postscript, dvi, and djvu conversion'
  35.   'princexml: llppac html conversion'
  36.   'unoconv: llppac office document conversion'
  37.   'antiword: llppac .doc conversion (alternative)'
  38.   'inkscape: llppac svg conversion (preferred)'
  39.   'librsvg: llppac svg conversion (alternative)'
  40.   'imagemagick: llppac image conversion'
  41.   'pango: llppac font conversion'
  42.   'pandoc: llppac text conversion'
  43. )
  44. options=('!strip')
  45.  
  46. pkgver() {
  47.   cd llpp
  48.   git describe --tags | sed 's/^v//;s/-/.r/;s/-/./'
  49. }
  50.  
  51. build() {
  52.   cd llpp
  53.   sed -i -e 's+-I \$srcdir/mupdf/include -I \$srcdir/mupdf/thirdparty/freetype/include+-I /usr/include/freetype2+' build.sh
  54.   sed -i -e 's+-lmupdfthird+-lmupdfthird -lz -lfreetype -ljpeg -ljbig2dec -lopenjp2+' build.sh
  55.   sed -i -e 's+-L\$srcdir/mupdf/build/native ++' build.sh
  56.   # Eliminate build errors
  57.   # ./link.c:1669:13: error: implicit declaration of function ‘fz_set_use_document_css’ [-Wimplicit-function-declaration]
  58.   sed -i -e 's+fz_set_use_document_css (state.ctx, usedoccss);+/* fz_set_use_document_css (state.ctx, usedoccss); */+' link.c
  59.   # /usr/lib/libharfbuzz.so.0: error adding symbols: DSO missing from command line
  60.   sed -i -e 's+-lcrypto+-lcrypto -lharfbuzz+' build.sh
  61.   sh build.sh build/
  62.  
  63.   # shell completion
  64.   cd "$srcdir/llpp/misc/completions"
  65.   make
  66. }
  67.  
  68. package() {
  69.   cd "$srcdir/llpp"
  70.  
  71.   # llpp
  72.   install -Dm755 build/llpp "$pkgdir/usr/bin/llpp"
  73.  
  74.   # license
  75.   install -Dm644 README "$pkgdir/usr/share/licenses/llpp-git/README"
  76.  
  77.   cd "$srcdir/llpp/misc"
  78.  
  79.   # desktop integration
  80.   install -Dm644 llpp.desktop "$pkgdir/usr/share/applications/llpp.desktop"
  81.  
  82.   # helper scripts
  83.   install -Dm755 dicx "$pkgdir/usr/bin/dicx"
  84.   install -Dm755 dllpp "$pkgdir/usr/bin/dllpp"
  85.   install -Dm755 llppac "$pkgdir/usr/bin/llppac"
  86.   install -Dm755 gc.awk "$pkgdir/usr/bin/gc.awk"
  87.  
  88.   # custom key bindings
  89.   # https://wiki.archlinux.org/index.php/Llpp#Custom_key_bindings
  90.   install -Dm644 keys.txt "$pkgdir/usr/share/llpp-git/keys.txt"
  91.  
  92.   # CSS styles
  93.   install -Dm644 epub.css "$pkgdir/usr/share/llpp-git/epub.css"
  94.   install -Dm644 prince.css "$pkgdir/usr/share/llpp-git/prince.css"
  95.  
  96.   # Wikipedia
  97.   install -Dm644 wikipedia/wiki2.css "$pkgdir/usr/share/llpp-git/wiki2.css"
  98.   install -Dm755 wikipedia/wpget "$pkgdir/usr/share/llpp-git/wpget"
  99.  
  100.   # shell completion
  101.   install -Dm644 completions/bash/llpp "$pkgdir/usr/share/bash-completion/completions/llpp"
  102.   install -Dm644 completions/bash/llppac "$pkgdir/usr/share/bash-completion/completions/llppac"
  103.   install -Dm644 completions/zsh/llpp "$pkgdir/usr/share/zsh/site-functions/_llpp"
  104.   install -Dm644 completions/zsh/llppac "$pkgdir/usr/share/zsh/site-functions/_llppac"
  105. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top