Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2016
117
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None
  1. # Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
  2. # Contributor: Josh Kropf <josh@slashdev.ca>
  3. # Contributor: Bartosz Chmura <chmurli at gmail dot com>
  4. # Contributor: Mikkel Kroman <mk at maero dot dk>
  5.  
  6. pkgname=sublime-text
  7. pkgver=2.0.2
  8. pkgrel=4
  9. pkgdesc="Sophisticated text editor for code, html and prose"
  10. arch=('i686' 'x86_64')
  11. url="http://www.sublimetext.com/2"
  12. license=('custom')
  13. depends=("libpng" "gtk2" "bash" "procps-ng" "xdg-utils" "desktop-file-utils"
  14. "shared-mime-info")
  15. install="$pkgname.install"
  16. # EULA file is from http://www.sublimetext.com/eula
  17. # converted with 'html2text --ignore-links --body-width=80'
  18. source=("$pkgname-EULA"
  19. "$pkgname.desktop"
  20. "$pkgname.sh"
  21. "http://downloads.sourceforge.net/libpng/libpng-1.6.2.tar.xz"
  22. "http://downloads.sourceforge.net/libpng-apng/libpng-1.6.2-apng.patch.gz"
  23. "0001-libpng16-Avoid-dereferencing-NULL-pointer-possibly-r.patch"
  24. "0002-libpng16-Calculate-our-own-zlib-windowBits-when-deco.patch"
  25. "adjust-apng-patch-for-libpng16-git-changes.patch")
  26. source_i686=("http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20${pkgver}.tar.bz2")
  27. source_x86_64=("http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20${pkgver}%20x64.tar.bz2")
  28. sha256sums=('43aa2cf3becee23697177c6e6ecd4fc2c4b459499631bfdb2533cdb60c27530e'
  29. '3f11bf8cb814b68ed81b535dd13cc86bb28c71010d74141bfa06137782fd2f7d'
  30. '765c8a65ef429dc81a983d14d94c97a2d185575d74e702861ad3e374e2759338'
  31. '1c97a90bc22107e50f04f77a0115f4ec890d5c6a373ac4c560e8fb87259e92de'
  32. '4196f3c3894f455a78a65170209fc948b01a7448304d8c39bc29d37852b8c73b'
  33. '0632ea1d588cb7b85dfc2c13444de1682e9d7e61caaf8cce118fc535bc9f4d90'
  34. '2a65904c85ff492d4f91edd55e17f81ba36ee6af1cac7402f786580f3fc56216'
  35. '1f51e33233ce560c5d8002bc096aa4cc5be70c082e08b14db4376a9a02f2714a')
  36. sha256sums_i686=('07338e041cfb348938fa8069f0aad3b5b43c319b7ec564ffff1489796f2dcf08')
  37. sha256sums_x86_64=('01baed30d66432e30002a309ff0393967be1daba5cce653e43bba6bd6c38ab84')
  38.  
  39. prepare() {
  40. # libpng
  41. rm -rf png_fake_install
  42. mkdir png_fake_install
  43. cd libpng-1.6.2
  44. patch -Np1 < ../0001-libpng16-Avoid-dereferencing-NULL-pointer-possibly-r.patch
  45. patch -Np1 -i ../0002-libpng16-Calculate-our-own-zlib-windowBits-when-deco.patch
  46. patch -d .. -Np0 < ../adjust-apng-patch-for-libpng16-git-changes.patch
  47. patch -Np1 < ../libpng-1.6.2-apng.patch
  48. }
  49.  
  50. build() {
  51. # libpng
  52. cd libpng-1.6.2
  53. ./configure --prefix=/ --with-binconfigs=no --enable-shared --disable-static
  54. make install DESTDIR="$srcdir"/png_fake_install
  55. }
  56.  
  57. package () {
  58. install -d "$pkgdir"/opt
  59. cp -rup "Sublime Text 2" "$pkgdir"/opt/$pkgname
  60.  
  61. # launcher
  62. install -Dm755 $pkgname.sh "$pkgdir"/usr/bin/subl
  63.  
  64. # .desktop file and icons
  65. install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
  66. for _res in 256x256 128x128 48x48 32x32 16x16; do
  67. install -d "$pkgdir"/usr/share/icons/hicolor/$_res/apps
  68. ln -s /opt/$pkgname/Icon/$_res/sublime_text.png \
  69. "$pkgdir"/usr/share/icons/hicolor/$_res/apps/$pkgname.png
  70. done
  71.  
  72. # license
  73. install -Dm644 $pkgname-EULA "$pkgdir"/usr/share/licenses/$pkgname/EULA
  74.  
  75. # libpng
  76. install -m644 png_fake_install/lib/libpng16.so.16.2.0 \
  77. "$pkgdir"/opt/$pkgname/lib/libpng16.so.16.2.0
  78. ln -s libpng16.so.16.2.0 "$pkgdir"/opt/$pkgname/lib/libpng16.so.16
  79. ln -s libpng16.so.16 "$pkgdir"/opt/$pkgname/lib/libpng16.so
  80. ln -s libpng16.so "$pkgdir"/opt/$pkgname/lib/libpng.so
  81. }
Advertisement
RAW Paste Data Copied
Advertisement