Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 65 lines (48 sloc) 1.39 KB
#! /bin/bash
PKG=rstudio
VERSION=1.1.383
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
#PREFIX=/dev/shm/$PKG-$VERSION-$BUILD
set -xe
umask 022
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
exec </dev/null
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
EOF
. $PREFIX/profile
export MAKEFLAGS="-j $(nproc)"
BUILD=$PREFIX/build
mkdir -p $BUILD
cd $BUILD
mkdir -p disable-sudo
echo 'exec "$@"' >disable-sudo/sudo
chmod +x disable-sudo/sudo
PATH=$BUILD/disable-sudo:$PATH
QTPREFIX=/usr/local/qt5
test -e v$VERSION.tar.gz || wget https://github.com/rstudio/rstudio/archive/v$VERSION.tar.gz
test -d rstudio-$VERSION || tar xf v$VERSION.tar.gz
cd rstudio-$VERSION
perl -pi -e "s(/opt/rstudio-tools)($PREFIX/rstudio-tools)g" dependencies/common/install-boost src/cpp/CMakeLists.txt
( cd dependencies/common; ./install-common )
IFS=. read -ra VER<<<$VERSION
export RSTUDIO_VERSION_MAJOR=${VER[0]}
export RSTUDIO_VERSION_MINOR=${VER[1]}
export RSTUDIO_VERSION_PATCH=${VER[2]}
cmake . \
-DRSTUDIO_TARGET=Desktop \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DQT_QMAKE_EXECUTABLE=${QTPREFIX}/bin/qmake \
-DCMAKE_INSTALL_RPATH=$PREFIX/lib\;$QTPREFIX/lib \
-DRSTUDIO_GIT_REVISION_HASH=ARSCH
make
make install
rm -r $PREFIX/bin/pandoc
exit