slackbuilds/d/rpl2-lang/SlackBuild.broken

95 lines
2.5 KiB
Text
Raw Permalink Normal View History

#!/bin/bash
# variables
CWD=$(pwd)
PRGNAM=$(basename $CWD)
2023-10-24 08:16:12 +02:00
VERSION=${VERSION:-4.1.34}
ARCH=${ARCH:-$(uname -m)}
BUILD=1
TAG=gwh
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORY=/var/cache/SlackBuilds.gwh/$PRGNAM
PREFIX=/usr
SLCKFLAGS=" -O "
# nettoyage préalable
rm -fr $PKG $TMP/rpl-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
mkdir -p $REPOSITORY
2023-10-24 08:16:12 +02:00
[ ! -e $REPOSITORY/$PRGNAM-$VERSION.tar.bz2 ] && wget -c -O $REPOSITORY/$PRGNAM-$VERSION.tar.bz2 http://www.rpl2.fr/download/rpl-${VERSION}.tar.bz2
[ ! -e $REPOSITORY/reference_rpl_french.ps.bz2 ] && wget -c -O $REPOSITORY/reference_rpl_french.ps.bz2 http://www.rpl2.fr/download/reference_rpl_french.ps.bz2
cd $TMP/
tar xvf $REPOSITORY/$PRGNAM-$VERSION.tar.bz2
cd rpl-$VERSION
# configuration
./autogen.sh
./configure \
--prefix=$PREFIX \
--mandir=$PREFIX/man \
--libdir=$PREFIX/lib$(uname -m | grep -o 64) \
--disable-embedded-gnuplot \
--disable-dependency-tracking
# --enable-rplcas \
# --enable-native \
# --enable-experimental \
# --with-x \
# compilation
make -j$(nproc)
# installation
make install DESTDIR=$PKG
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R AUTHORS COPYING ChangeLog HEADER INSTALL LIMITATIONS Licence_CeCILL_V2-en.txt Licence_CeCILL_V2-fr.txt NEWS README doc/ examples/ $PKG$PREFIX/doc/$PRGNAM
bzcat $REPOSITORY/reference_rpl_french.ps.bz2 > $PKG$PREFIX/doc/$PRGNAM/reference_rpl_french.ps
# correction
cd $PKG
chown -R root:root *
find $PKG -name \.git\* -exec rm -fr {} \;
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (a programming language designed for scientific computations)
$PRGNAM:
$PRGNAM: Your goal: improve the portability and facilitate the writing of your numerical
$PRGNAM: algorithms or symbolic computations on parallel calulators.
$PRGNAM: A simple solution: use RPL/2 language and extensions
$PRGNAM: An functional Turing-equivalent language
$PRGNAM: A compiled language
$PRGNAM: A type-inference language
$PRGNAM: An extensible language
2023-10-24 08:16:12 +02:00
$PRGNAM:
$PRGNAM: http://www.rpl2.fr
EOF
# empaquetage
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2023-08-16 12:23:26 +02:00
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz