Commit 054db7e6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play rstudio: use build according to the distro

parent 28149aae
......@@ -7,10 +7,36 @@ DESCRIPTION='RStudio from the official site'
. $(dirname $0)/common.sh
arch=x86_64
pkgtype=rpm
pkgtype=$(epm print info -p)
repack=''
case $(epm print info -e) in
Ubuntu/22*|Ubuntu/23*)
PKGFILTER="jammy"
;;
AstraLinux*|Debian/*|Ubuntu/*)
PKGFILTER="bionic"
;;
RedOS/7*|AlterOS/*|Fedora/19)
PKGFILTER="centos7"
;;
CentOS/*|Fedora/34|Fedora/35|RHEL/8)
PKGFILTER="rhel8"
;;
Fedora/*|RHEL/9)
PKGFILTER="rhel9"
;;
ALTLinux/*|ALTServer/*)
PKGFILTER="rhel8"
repack='--repack'
;;
*)
fatal "Unsupported distro $(epm print info -e). Ask application vendor for a support."
;;
esac
PKGMASK="$(epm print constructname $PKGNAME "*" $arch $pkgtype)"
PKG="$(epm tool eget --list --latest https://www.rstudio.com/products/rstudio/download/ $PKGMASK)" || fatal "Can't get package URL"
PKG="$(epm tool eget --list https://www.rstudio.com/products/rstudio/download/ $PKGMASK | grep $PKGFILTER)" || fatal "Can't get package URL"
[ -n "$PKG" ] || fatal "Can't get package URL"
epm install --repack "$PKG"
epm install $repack "$PKG"
......@@ -21,4 +21,10 @@ remove_dir /usr/lib/.build-id
filter_from_requires libQt5 libicu "libpq.so.5(RHPG_9"
#if [ "$(epm print info -e)" = "ALTLinux/p10" ] ; then
# version `GLIBC_2.34' not found
# version `GLIBCXX_3.4.29' not found
# rm -v $BUILDROOT/usr/lib/rstudio/resources/app/bin/{diagnostics,rpostback,rsession}
#fi
epm install --skip-installed libpq5 libsqlite sqlite R-base R-doc-html
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment