summaryrefslogtreecommitdiffstats
path: root/perl/rakudo/rakudo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/rakudo/rakudo.SlackBuild')
-rw-r--r--perl/rakudo/rakudo.SlackBuild34
1 files changed, 22 insertions, 12 deletions
diff --git a/perl/rakudo/rakudo.SlackBuild b/perl/rakudo/rakudo.SlackBuild
index 2d5fee4d31..8d68a5d13d 100644
--- a/perl/rakudo/rakudo.SlackBuild
+++ b/perl/rakudo/rakudo.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for rakudo
-# Copyright 2018-2019 Andreas Voegele <andreas@andreasvoegele.com>
+# Copyright 2020- Michel Begue <mab974@misouk.com>
+# Copyright 2018-2020 Andreas Voegele <andreas@andreasvoegele.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -16,10 +17,13 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=rakudo
-VERSION=${VERSION:-2019.11}
+VERSION=${VERSION:-2024.03}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
BACKENDS=${BACKENDS:-moar}
@@ -31,7 +35,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}
@@ -99,31 +110,30 @@ chmod 755 $PKG/usr/bin/raku-install-dist
ln -s raku-install-dist $PKG/usr/bin/perl6-install-dist
# Create rakudo.csh and rakudo.sh in /etc/profile.d.
-BINDIRS='$HOME/.perl6/bin:/usr/share/perl6/site/bin:/usr/share/perl6/vendor/bin'
+BINDIRS='$HOME/.raku/bin:/usr/share/perl6/site/bin:/usr/share/perl6/vendor/bin'
mkdir -p $PKG/etc/profile.d
-cat << EOF > $PKG/etc/profile.d/rakudo.csh.new
+cat << EOF > $PKG/etc/profile.d/rakudo.csh
#!/bin/csh
setenv PATH \${PATH}:$BINDIRS
EOF
-chmod 755 $PKG/etc/profile.d/rakudo.csh.new
-cat << EOF > $PKG/etc/profile.d/rakudo.sh.new
+chmod 755 $PKG/etc/profile.d/rakudo.csh
+cat << EOF > $PKG/etc/profile.d/rakudo.sh
#!/bin/sh
export PATH=\$PATH:$BINDIRS
EOF
-chmod 755 $PKG/etc/profile.d/rakudo.sh.new
+chmod 755 $PKG/etc/profile.d/rakudo.sh
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 \
- CREDITS LICENSE README.md \
+ CREDITS LICENSE README.md docs/ChangeLog \
$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
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
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