Merge pull request #151 from rstudio/custom-install-path

Support custom installation paths for R
This commit is contained in:
Greg Lin 2023-01-18 12:25:04 -06:00 committed by GitHub
commit b67a78e39e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,14 +28,14 @@ fi
#
# https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Shared-BLAS
cat <<EOF >> /post-install.sh
mv /opt/R/${R_VERSION}/lib/R/lib/libRblas.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so.keep
ln -s /usr/lib64/libopenblas.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
mv ${R_INSTALL_PATH}/lib/R/lib/libRblas.so ${R_INSTALL_PATH}/lib/R/lib/libRblas.so.keep
ln -s /usr/lib64/libopenblas.so ${R_INSTALL_PATH}/lib/R/lib/libRblas.so
EOF
# Create after-remove script to remove internal BLAS, which won't be cleaned up automatically.
cat <<EOF >> /after-remove.sh
if [ -d /opt/R/${R_VERSION} ]; then
rm -r /opt/R/${R_VERSION}
if [ -d ${R_INSTALL_PATH} ]; then
rm -r ${R_INSTALL_PATH}
fi
EOF
@ -85,8 +85,8 @@ depends:
- zip
- zlib-devel
contents:
- src: /opt/R/${R_VERSION}
dst: /opt/R/${R_VERSION}
- src: ${R_INSTALL_PATH}
dst: ${R_INSTALL_PATH}
scripts:
postinstall: /post-install.sh
postremove: /after-remove.sh