Skip to content

Commit

Permalink
Merge pull request #143 from mariux64/add-prebuild-rstudio-1.2.5042
Browse files Browse the repository at this point in the history
rstudio: check/fallback-install of prebuild package
thomas authored Feb 9, 2021
2 parents 5a59f11 + d773e54 commit 01ad6a6
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions rstudio-1.2.5042-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#! /bin/bash

# utilize the 'debian'-package from rstudio site, take for reference, or fallback

PKG=rstudio
VERSION=1.2.5042
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi

set -xe
umask 022

BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home

# mind the PATH ...
# ----------------------------
# it should work with:
# prun R4 rstudio
# xfce launcher
# own R on the path

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH:/usr/local/package/bin
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi
EOF
. $PREFIX/profile

BUILD=$PREFIX/build

mkdir -p $BUILD
cd $BUILD

# orig: https://download1.rstudio.org/desktop/trusty/amd64/rstudio-1.2.5042-amd64-debian.tar.gz
test -e rstudio-$VERSION-amd64-debian.tar.gz || wget -nv https://beehive.molgen.mpg.de/7996b4693f4b24899868a86587f4f705/rstudio-1.2.5042-amd64-debian.tar.gz
test -d rstudio-$VERSION || tar -xf rstudio-$VERSION-amd64-debian.tar.gz

mv -v rstudio-1.2.5042/* ..

exit

0 comments on commit 01ad6a6

Please sign in to comment.