openSUSE/SLES 15.3 originally shipped with ICU 65 (libicu-devel), but later added ICU 69 (icu.691-devel) in a patch update. Prefer ICU 69 because the devel packages can't coexist, and zypper now resolves libicu-devel to icu.691-devel. https://lists.suse.com/pipermail/sle-security-updates/2021-December/009908.html
74 lines
1.7 KiB
Shell
74 lines
1.7 KiB
Shell
#!/bin/bash
|
|
|
|
if [[ ! -d /tmp/output/opensuse-153 ]]; then
|
|
mkdir -p /tmp/output/opensuse-153
|
|
fi
|
|
|
|
# R 3.x requires PCRE1
|
|
pcre_lib='pcre2-devel'
|
|
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
|
pcre_lib='pcre-devel'
|
|
fi
|
|
|
|
# create post-install script required for openblas
|
|
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
|
|
EOF
|
|
|
|
# create after-remove script to remove internal blas
|
|
cat <<EOF >> /before-remove.sh
|
|
if [ -d /opt/R/${R_VERSION} ]; then
|
|
rm -r /opt/R/${R_VERSION}
|
|
fi
|
|
EOF
|
|
|
|
fpm \
|
|
-s dir \
|
|
-t rpm \
|
|
-v 1 \
|
|
-n R-${R_VERSION} \
|
|
--vendor "RStudio, PBC" \
|
|
--deb-priority "optional" \
|
|
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
|
--url "http://www.r-project.org/" \
|
|
--description "GNU R statistical computation and graphics system" \
|
|
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
|
--license "GPL-2" \
|
|
--after-install /post-install.sh \
|
|
--after-remove /before-remove.sh \
|
|
-p /tmp/output/opensuse-153/ \
|
|
-d fontconfig \
|
|
-d gcc \
|
|
-d gcc-c++ \
|
|
-d gcc-fortran \
|
|
-d glibc-locale \
|
|
-d gzip \
|
|
-d icu.691-devel \
|
|
-d libbz2-devel \
|
|
-d libcairo2 \
|
|
-d libcurl-devel \
|
|
-d libfreetype6 \
|
|
-d libgomp1 \
|
|
-d libjpeg62 \
|
|
-d libpango-1_0-0 \
|
|
-d libreadline7 \
|
|
-d libtiff5 \
|
|
-d make \
|
|
-d openblas-devel \
|
|
-d ${pcre_lib} \
|
|
-d tar \
|
|
-d tcl \
|
|
-d tk \
|
|
-d unzip \
|
|
-d which \
|
|
-d xorg-x11 \
|
|
-d xorg-x11-fonts-100dpi \
|
|
-d xorg-x11-fonts-75dpi \
|
|
-d xz-devel \
|
|
-d zip \
|
|
-d zlib-devel \
|
|
/opt/R/${R_VERSION}
|
|
|
|
shopt -s extglob
|
|
export PKG_FILE=$(ls /tmp/output/opensuse-153/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|