Code: Select all
# cd /usr/bin
# ls R*
R Rcmdr Rcmdr.sh R.sh
# more R.sh
#!/bin/sh
# this starts R and calls the start script /root/.Rprofile
# which starts Rcmdr
xterm -e /mnt/home/R-2.12.1/bin/R --no-init-files.
Code: Select all
# cd /usr/bin
# ls R*
R Rcmdr Rcmdr.sh R.sh
# more R.sh
#!/bin/sh
# this starts R and calls the start script /root/.Rprofile
# which starts Rcmdr
xterm -e /mnt/home/R-2.12.1/bin/R --no-init-files.
Code: Select all
install.packages("Rcmdr", dependencies=TRUE)
Code: Select all
cd /mnt/home/Compile/R-2.12.2
mkdir bld # create build directory
cd bld
../configure -prefix=/opt/R-2.12.1 #set the final installation directory
make
make check #hopefully no errors detected
make install # Version A: build R+ Rcmdr sfs
# new2dir make install-strip # Version B: build just R pet
# /opt/R-2.12.1/bin/R
# demo(graphics) # Version B: test, if works
# cd /mnt/home/Compile
# now add any menu entries, symlinks etc to directory R-2.12.1-i386
# dir2pet R-2.12.1-i386 # use TAB completion - it rocks!
# End Version B creation of only R - pet
# (Rcmdr can be installed from inside R anytime)
/opt/R-2.12.1/bin/R # Version A - Follow up:run R
install.packages("Rcmdr", dependencies=TRUE) #install Rcmdr
demo(graphics) # quick test
library(Rcmdr) # quick test of Rcmdr
Ctrl-D # leave R
cd /mnt/home/Compile/R-2.12.1 # have done no stripping yet
mkdir -p R-2.12.1-sfs-dir/opt #make a coppy of the installation
# maybe there is an error while stripping, so better keep the original
# also your savefile could become full when you create sfs in "/" range,
# so better switch to /mnt/home
cp -nvr /opt/R-2.21.1 ./R-2.21.1-sfs-dir/opt # prepare this dir- tree also for sfs creation
cd R-2.12.1-sfs-dir #
Code: Select all
#--striptree.sh --
#!/bin/sh
# replace double files with hardlinks in all directory tree
findup -m .
# strip executables
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : |
xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
Code: Select all
striptree.sh
./opt/bin/R # cross fingers and start R
demo(graphics) # works
library(Rcmdr) # seems to work too
mkdir -p ./usr/bin # create a Symlink so R is in the path
ln -s ./opt/bin/R ./usr/bin/R
# simliar create menu entries and include icons etc,
# maybe weed out some bloat manually
# when finish do
cd ..
dir2sfs R-2.12.1-sfs-dir #produce our new R sfs package
mv R-2.12.1.sfs /mnt/home # shift it to /mnt/home
rm -r /opt/R-2.12.1 # delete installation: Oops!
# mv /opt/R-2.12.1 to_backup_location # maybe better to keep the original