diff options
Diffstat (limited to 'academic/R/R.SlackBuild')
-rw-r--r-- | academic/R/R.SlackBuild | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/academic/R/R.SlackBuild b/academic/R/R.SlackBuild index 639e28c92b..3ee98369fc 100644 --- a/academic/R/R.SlackBuild +++ b/academic/R/R.SlackBuild @@ -1,10 +1,9 @@ -#!/bin/sh +#!/bin/bash # SlackBuild script for R -# Copyright 2019 Andrew Payne <phalange@komputermatrix.com> -# Copyright 2014-2017 melikamp, Andrew Rowland. (Contributors are -# listed in order of first participation.) +# Copyright 2019-2022 Andrew Payne <phalange@komputermatrix.com> +# Copyright 2014-2017 melikamp, Andrew Rowland # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,10 +23,13 @@ # with this program (most likely, a file named COPYING). If not, see # <http://www.gnu.org/licenses/>. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=R -VERSION=${VERSION:-3.6.1} +VERSION=${VERSION:-4.3.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ "${R_SHLIB:-yes}" = "yes" ]; then r_shlib="--enable-R-shlib" @@ -48,7 +50,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -73,7 +82,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -106,10 +115,12 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a {COPYING,INSTALL,README,SVN-REVISION,VERSION,VERSION-NICK} \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |