Advertisement
Guest User

PKGBUILD_rstudio-server-git

a guest
Jan 15th, 2015
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.27 KB | None | 0 0
  1. #
  2. # Maintainer: gabx <arnaud.gaboury@gmail.com>
  3. #
  4. # Note: Apache ant and java must be on the path for make to succeed.
  5. #       If either was installed as a dependency during the build, you
  6. #       will need to log out and then log back in for the changes to
  7. #       your path and JAVA_HOME environment variable to take effect.
  8. #
  9. pkgname=rstudio-server-git
  10. _gitname="rstudio"
  11. pkgver=v0.99.173.r0.g45aa33a
  12. pkgrel=1
  13. pkgdesc="A new integrated development environment (IDE) for R programming language"
  14. arch=('i686' 'x86_64')
  15. url="http://www.rstudio.org/"
  16. license=('AGPL3')
  17. depends=('r>=2.11.1' 'boost-libs>=1.5' 'util-linux' 'gcc-libs')
  18. makedepends=('git' 'cmake>=2.8' 'boost>=1.5' 'clang' 'java-runtime' 'apache-ant' 'unzip' 'openssl' 'bzip2' 'pango' 'pam' 'wget' 'zlib')
  19. install="${pkgname}.install"
  20. conflicts=('rstudio-server')
  21. source=('git://github.com/rstudio/rstudio.git'
  22.     'rstudio-server.service')
  23. md5sums=('SKIP'
  24.     'eea28f7865720f6c8d5de12f3f631880')
  25.          
  26.  
  27. pkgver() {
  28.   cd "$srcdir/$_gitname"
  29.   git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
  30. }
  31.  
  32. build() {
  33.   cd "${srcdir}/$_gitname/dependencies/common"
  34.   msg "Downloading and installing gwt"
  35.   ./install-gwt
  36.   msg "Downloading and installing dictionaries"
  37.   ./install-dictionaries
  38.   msg "Downloading and installing mathjax"
  39.   ./install-mathjax
  40.   msg "Downloading and installing pandoc"
  41.   ./install-pandoc
  42.   msg "Downloading and installing packages"
  43.   ./install-packages
  44.   msg "Downloading and install libclang"
  45.   ./install-libclang
  46.   # Small hack
  47.   #sed -i 's/init.d/rc.d/' ${srcdir}/rstudio/src/cpp/#server/extras/admin/rstudio-server.in
  48.   # unset user Rprofile.r variable for building
  49.   if [ -n $R_PROFILE_USER ]; then
  50.   unset R_PROFILE_USER
  51.   fi
  52.   # Configure with cmake in a new buld directory as recommended in the rstudio INSTALL file
  53.   mkdir "${srcdir}/$_gitname/build"
  54.   cd "${srcdir}/$_gitname/build"
  55.   # Configure cmake
  56.     #cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio-server -DCMAKE_DL_LIBRARIES=/usr/lib64/libdl.so -DCMAKE_LIBR_BLAS_LIBRARY=/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64-DCMAKE_LIBR_DOC_DIR=/usr/share/doc/R  -DCMAKE_LIBR_EXECUTABLE=/usr/bin/R  -DCMAKE_LIBR_HOME=/usr/lib64/R -DCMAKE_LIBR_INCLUDE_DIRS=/usr/include/R -DCMAKE_LIBR_CORE_LIBRARY=usr/lib64/R/lib/libR.so ..
  57.     cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio-server ..
  58.  
  59. }
  60.  
  61.  
  62. package() {
  63.   msg "Starting make and install..."
  64.   cd "${srcdir}/$_gitname/build"
  65.   make DESTDIR="$pkgdir" install
  66.   msg "Install adittional files..."
  67.   install -d "${pkgdir}/etc/pam.d"
  68.   install -Dm 644 "${pkgdir}/usr/lib/rstudio-server/extras/pam/rstudio" "${pkgdir}/etc/pam.d/rstudio"
  69.   #install -d "${pkgdir}/srv"
  70.   #mv "${pkgdir}/usr/lib/rstudio-server/www" "${pkgdir}/srv/rstudio"
  71.   install -d "${pkgdir}/var/log/rstudio-server/"
  72.   install -d "${pkgdir}/var/lib/rstudio-server/"
  73.   install -d "${pkgdir}/run/rstudio-server/"
  74.   install -d "${pkgdir}/run/lock/rstudio-server/"
  75.   rm -rf "${pkgdir}/usr/lib/rstudio-server/extras"
  76.   install -d "${pkgdir}/etc/systemd/system"
  77.   install -Dm 644 "${srcdir}/rstudio-server.service" "${pkgdir}/etc/systemd/system/rstudio-server.service"
  78.   install -d "${pkgdir}/etc/rstudio"
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement