Advertisement
ristridin

acroread PKGBUILD

Dec 8th, 2014
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.51 KB | None | 0 0
  1. # Maintainer: Tom Kwok <contact@tomkwok.com>
  2. # Contributor: Jose Valecillos <valecillosjg at gmail dot com>
  3. # Contributor: Guido <qqqqqqqqq9 at web dot de>
  4. # Contributor: Limao Luo <luolimao+AUR at gmail com>
  5. # Contributor: Alexander Fehr <pizzapunk at gmail dot com>
  6.  
  7. pkgname=acroread
  8. pkgver=9.5.5
  9. pkgrel=5
  10. pkgdesc="Adobe Reader is a PDF file viewer"
  11. arch=('i686' 'x86_64')
  12. url="http://www.adobe.com/products/reader/"
  13. license=(custom)
  14. depends=('desktop-file-utils' 'gtk2' 'libxml2' 'libxt' 'mesa' 'pangox-compat' 'libidn')
  15. optdepends=('acroread-fonts: CJK and extended font packs'
  16.             'libcanberra: XDG sound support'
  17.             'gtk-engine-murrine: fix ugly buttons and scrollbars'
  18.             )
  19. if [[ $CARCH == "x86_64" ]]; then
  20.    depends=('desktop-file-utils' lib32-{gtk2,libxml2,libxt,mesa,libidn} 'pangox-compat') &&
  21.    optdepends=('acroread-fonts: CJK and extended font packs'
  22.             'lib32-libcanberra: XDG sound support'
  23.             'lib32-gtk-engine-murrine: fix ugly buttons and scrollbars'
  24.             )
  25. fi
  26.  
  27. makedepends=(bsdiff)
  28. # optdepends=("${optdepends[@]/lib32-/}")
  29. options=(!strip)
  30. install=$pkgname.install
  31. source=($pkgname.desktop nppdf.bsdiff
  32.     http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/$pkgver/enu/AdbeRdr$pkgver-1_i486linux_enu.bin)
  33. noextract=("${source[@]%%::*}")
  34. sha256sums=('6f72d131fd3ceadead6573fd9520fa073007442ba40b58d457e73c3599fe4173'
  35.             'c4af33225843c71eba0aa831e8c08fe99d54ea998e087cd3f5a786e892ecc0b8'
  36.             'f3d060c1ab475a649dec6316c0b5a4a7e1055f9681ec2f35b4f77a070dfb3ea2')
  37. sha512sums=('e8ee711536892ced9a0f932c8cf44332dabf10754139f93229dd1d38113bf6521ea3fc42a8a54170c85ef9da009d6ae34233cdda8bf798e2f5bf6e0ae61e37d1'
  38.             '253def4898cc2469ef5ed33630302e9da4a65707297f2ecc207d7467e7369e4f1014aa77aac93538ea0682dd4c2eee408b7632a319d1ba850fb49ba608fde6de'
  39.             'f9c18ca0dc0687de353afeb90925439a557a14604e6361ff2b229ec29257ff051ea9eac6a90671b38a745473b5c87135377d035520f441ceaabf2510d690675b')
  40. prepare() {
  41.     # Extracting content from bin file
  42.     tail -c+6889 AdbeRdr9.5.5-1_i486linux_enu.bin | xz -qqd | tar x
  43. }
  44.  
  45. build() {
  46.     cd AdobeReader/
  47.     bsdtar -xf COMMON.TAR
  48.     bsdtar -xf ILINXR.TAR
  49.  
  50.     sed -i "s/_filedir/&_acroread/" Adobe/Reader9/Resource/Shell/acroread_tab
  51.     # Bug on log created by Adobe Reader browser plugin https://bugs.launchpad.net/ubuntu/+source/acroread/+bug/986841
  52.     bspatch Adobe/Reader9/Browser/intellinux/nppdf.so Adobe/Reader9/Browser/intellinux/nppdf.so ../nppdf.bsdiff
  53. }
  54.  
  55. package() {
  56.     desktop-file-install $pkgname.desktop --dir "$pkgdir"/usr/share/applications/
  57.     cd AdobeReader/Adobe/Reader9/
  58.  
  59.     msg2 "Installing Main Files..."
  60.     install -d "$pkgdir"/opt/Adobe/Reader9
  61.     cp -a * "$pkgdir"/opt/Adobe/Reader9/
  62.  
  63.     msg2 "Installing Bin Files..."
  64.     install -d "$pkgdir"/usr/bin/
  65.     ln -s /opt/Adobe/Reader9/bin/acroread "$pkgdir"/usr/bin/
  66.     install -Dm644 Resource/Shell/acroread.1.gz "$pkgdir"/usr/share/man/man1/acroread.1.gz
  67.     install -Dm644 Resource/Shell/acroread_tab "$pkgdir"/etc/bash_completion.d/acroread
  68.  
  69.     msg2 "Installing Broswer Plugin..."
  70.     install -d "$pkgdir"/usr/lib/mozilla/plugins/
  71.     ln -s /opt/Adobe/Reader9/Browser/intellinux/nppdf.so "$pkgdir"/usr/lib/mozilla/plugins/
  72.  
  73.     msg2 "Installing Icon Resources..."
  74.     install -Dm644 Resource/Icons/64x64/AdobeReader9.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
  75.  
  76.     msg2 "Installing License..."
  77.     install -Dm644 Reader/Legal/en_US/License.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement