diff options
Diffstat (limited to 'development/rstudio-desktop/rstudio-desktop.SlackBuild')
-rw-r--r-- | development/rstudio-desktop/rstudio-desktop.SlackBuild | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/development/rstudio-desktop/rstudio-desktop.SlackBuild b/development/rstudio-desktop/rstudio-desktop.SlackBuild index 7addfc55bc..bb963e3e1f 100644 --- a/development/rstudio-desktop/rstudio-desktop.SlackBuild +++ b/development/rstudio-desktop/rstudio-desktop.SlackBuild @@ -2,7 +2,9 @@ # Slackware build script for rstudio-desktop -# Copyright 2018 Ekin Akoglu, Erdemli/Mersin, Turkey +# Copyright 2023 Petar Petrov, slackalaxy at gmail dot com +# Copyright 2022-2023 Isaac Yu <isaacyu1@isaacyu1.com> +# Copyright 2018 Ekin Akoglu, Erdemli/Mersin, Turkey <ekinakoglu@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,8 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=rstudio-desktop -SRCNAM=rstudio -VERSION=${VERSION:-1.1.463} +VERSION=${VERSION:-2023.09.1+494} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,34 +40,29 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi +if [ "$ARCH" != "x86_64" ]; then + printf "\n\n$ARCH is not supported... \n" + exit 1 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then - PACKAGESUFFIX="i386" -elif [ "$ARCH" = "x86_64" ]; then - PACKAGESUFFIX="amd64" -else - echo "$ARCH is not supported." >&2 - exit 1 -fi - set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $PKG -ar x $CWD/${SRCNAM}-${VERSION}-${PACKAGESUFFIX}.deb -tar xvzf data.tar.gz +cd $TMP +rm -rf rstudio-${VERSION/+/-} +mkdir rstudio-${VERSION/+/-} +cd rstudio-${VERSION/+/-} +bsdtar -xvf $CWD/rstudio-${VERSION/+/-}-$ARCH.rpm chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -74,20 +70,23 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p $PKG/usr/{bin,lib64} +cp -a usr/lib/rstudio $PKG/usr/lib64 +cp -a usr/share $PKG/usr -rm -f $PKG/_gpgbuilder -rm -f $PKG/control.tar.gz -rm -r $PKG/data.tar.gz -rm -f $PKG/debian-binary +cd $PKG/usr/bin +ln -s ../lib64/rstudio/rstudio . +cd - -mkdir -p $PKG/usr/bin -ln -sf /usr/lib/rstudio/bin/rstudio $PKG/usr/bin +# We use the symlink in /usr/bin +sed -i 's:/usr/lib/rstudio/rstudio:rstudio:' $PKG/usr/share/applications/rstudio.desktop + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - $PKG/usr/lib/rstudio/{COPYING,INSTALL,NOTICE,README.md,SOURCE} \ + $PKG/usr/lib64/rstudio/resources/app/{COPYING,NOTICE,README.md,SOURCE} \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |