PKGBUILD 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Contributor (AUR): Ben Ward <benjamin.ward@bathspa.org>
  2. # Contributor (AUR): Alexsandr Pavlov <kidoz at mail dot ru>
  3. # Maintainer (AUR): Philipp A. <flying-sheep@web.de>
  4. # parabola changes and rationale:
  5. # - added .install file to update desktop database
  6. pkgname=rstudio-desktop
  7. pkgver=1.1.419
  8. _gwtver=2.7.0
  9. _ginver=1.5
  10. _clangver=3.6.1
  11. pkgrel=1
  12. pkgdesc="Open source and enterprise-ready professional software for the R community"
  13. arch=(i686 x86_64 armv7h)
  14. url="http://www.rstudio.com/"
  15. license=(AGPL)
  16. depends=(
  17. 'r>=2.11.1' 'boost-libs>=1.63'
  18. pango shared-mime-info mathjax pandoc clang
  19. qt5-base qt5-declarative qt5-location qt5-sensors qt5-svg qt5-webkit qt5-xmlpatterns
  20. )
  21. makedepends=('cmake>=2.8' 'boost>=1.63' java-environment apache-ant openssl pam)
  22. conflicts=(rstudio-desktop-bin rstudio-desktop-git rstudio-desktop-preview-bin)
  23. install=rstudio.install
  24. source=(
  25. "rstudio-$pkgver.tar.gz::https://github.com/rstudio/rstudio/tarball/v$pkgver"
  26. "https://s3.amazonaws.com/rstudio-buildtools/gin-$_ginver.zip"
  27. "https://s3.amazonaws.com/rstudio-buildtools/gwt-$_gwtver.zip"
  28. 'https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip'
  29. )
  30. noextract=('core-dictionaries.zip' "gin-$_ginver.zip")
  31. sha256sums=('597c373092ea3416da2e44fada07734e106b40f961784bf5d951641c18c29f3a'
  32. 'f561f4eb5d5fe1cff95c881e6aed53a86e9f0de8a52863295a8600375f96ab94'
  33. 'aa65061b73836190410720bea422eb8e787680d7bc0c2b244ae6c9a0d24747b3'
  34. '4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494')
  35. _pkgname=rstudio
  36. _check_version() {
  37. local varname=$1
  38. local real=$2
  39. local path=$3
  40. msg2 "Checking if $varname in file “$path” is “$real”"
  41. local test=$(grep -P "$varname=[\\d.]+" "$path" | cut -d= -f2)
  42. if [[ "$test" != "$real" ]]; then
  43. msg2 "Check failed: $varname is $test" >&2
  44. exit 1
  45. fi
  46. }
  47. prepare() {
  48. cd "$srcdir/$_pkgname-$_pkgname-"*
  49. _check_version GIN_VER $_ginver 'dependencies/common/install-gwt' || exit 1
  50. _check_version GWT_SDK_VER $_gwtver 'dependencies/common/install-gwt' || exit 1
  51. unzip -o "$srcdir/gin-$_ginver.zip" -d "../gin-$_ginver"
  52. }
  53. build() {
  54. cd "$srcdir/$_pkgname-$_pkgname-"*
  55. install -d src/gwt/lib/{gin/$_ginver,gwt/$_gwtver}
  56. cp -r "$srcdir/gin-$_ginver/"* "src/gwt/lib/gin/$_ginver"
  57. cp -r "$srcdir/gwt-$_gwtver/"* "src/gwt/lib/gwt/$_gwtver"
  58. (
  59. cd 'dependencies/common'
  60. install -d dictionaries libclang/{3.5,builtin-headers}
  61. unzip -qfod 'dictionaries' "$srcdir/core-dictionaries.zip"
  62. ln -sfT '/usr/share/mathjax' mathjax-26
  63. ln -sfT '/usr/bin' pandoc
  64. ln -sfT '/usr/lib/libclang.so' libclang/3.5/libclang.so
  65. ln -sfT "/usr/lib/clang/$_clangver/include" libclang/builtin-headers/3.5
  66. #TODO: https://github.com/rstudio/rsconnect.git
  67. #TODO: https://github.com/rstudio/rmarkdown.git
  68. bash 'install-packages'
  69. )
  70. cmake -DRSTUDIO_TARGET=Desktop \
  71. -DCMAKE_BUILD_TYPE=Release \
  72. -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt5 \
  73. -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio
  74. }
  75. package() {
  76. cd "$srcdir/$_pkgname-$_pkgname-"*
  77. make DESTDIR="$pkgdir/" install
  78. install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
  79. install -d "$pkgdir/usr/bin"
  80. ln -sfT ../lib/rstudio/bin/rstudio "$pkgdir/usr/bin/rstudio"
  81. }