summaryrefslogtreecommitdiff
path: root/rstudio/Pkgfile
blob: 4fec92c89b188a5f2e0aa0b131865fd359caa273 (plain)
    1 # Description: RStudio - an Interface for GNU R
    2 # URL: https://www.rstudio.com/
    3 # Maintainer: Tim Biermann, tbier at posteo dot de
    4 # Depends on: ant boost hyphen libevent mathjax openjdk8 pandoc-bin qtwebengine r
    5 
    6 name=rstudio
    7 version=1.2.5019
    8 _gwtver=2.8.1
    9 _ginver=2.1.2
   10 release=1
   11 source=(
   12   https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
   13   https://s3.amazonaws.com/rstudio-buildtools/gin-$_ginver.zip
   14   https://s3.amazonaws.com/rstudio-buildtools/gwt-$_gwtver.zip
   15   https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
   16   217ce0962734ae85621fd82f0eed86129c991a79.patch)
   17 git=(https://github.com/rstudio/rstudio.git)
   18 
   19 unpack_source() {
   20   for file in ${source[@]}; do
   21     case ${file##*/} in
   22       rstudio-$version.tar.gz)
   23         bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
   24         #if you need a git based build, comment the line above and uncomment the line below
   25         #git clone $git $SRC/$name-$version ;;
   26       gwt-$_gwtver.zip)
   27         gwtdir=$SRC/$name-$version/src/gwt
   28 
   29         install -d $gwtdir/dictionaries
   30         install -d $gwtdir/lib/gwt
   31         install -d $gwtdir/lib/gwt/$_gwtver
   32         unzip -qd $gwtdir/lib/gwt/$_gwtver $(get_filename $file) # ;;
   33         mv $gwtdir/lib/gwt/$_gwtver/gwt-$_gwtver/* $gwtdir/lib/gwt/$_gwtver ;;
   34       gin-$_ginver.zip)
   35         gwtdir=$SRC/$name-$version/src/gwt
   36         install -d $gwtdir/lib/gin
   37         install -d $gwtdir/lib/gin/$_ginver
   38         unzip -qo $(get_filename $file) -d $gwtdir/lib/gin/$_ginver ;;
   39       *)
   40         cp $(get_filename $file) $SRC ;;
   41     esac
   42   done
   43 }
   44 
   45 build() {
   46   cd $name-$version
   47   #if you want your git snapshot to be a particular version
   48   #git checkout v$version
   49   patch -Np1 -i $SRC/217ce0962734ae85621fd82f0eed86129c991a79.patch
   50   pushd dependencies/common
   51   install -d pandoc
   52   ln -sfT /usr/share/myspell/dicts dictionaries
   53   ln -sfT /usr/share/mathjax mathjax-26
   54   ln -sfT /usr/bin/pandoc pandoc/pandoc
   55   ln -sfT /usr/bin/pandoc-citeproc pandoc/pandoc-citeproc
   56   bash install-packages
   57   popd
   58 
   59   mkdir build
   60   pushd build
   61   export PATH="/usr/lib/java/openjdk8/jre/bin/:${PATH}"
   62   cmake -DRSTUDIO_TARGET=Desktop \
   63     -DCMAKE_BUILD_TYPE=Release \
   64     -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
   65     -DRSTUDIO_USE_SYSTEM_BOOST=yes \
   66     -DBoost_NO_BOOST_CMAKE=ON \
   67     -DRSTUDIO_BUNDLE_QT=FALSE \
   68     -DQT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
   69     ..
   70 
   71   make DESTDIR=$PKG install
   72   install -dm755 $PKG/usr/bin/
   73   ln -s /usr/lib/$name/bin/$name $PKG/usr/bin/$nam
   74   sed -i 's|/usr/lib/rstudio/bin/rstudio|/usr/bin/rstudio|g' $PKG/usr/share/applications/rstudio.desktop
   75   find $PKG \(\
   76     -iname '*README*' -o \
   77     -iname '*COPYING*' -o \
   78     -iname 'INSTALL' \
   79     \) -delete || true
   80 }

Generated by cgit