slackbuilds/d/UNUSED/raduko/raduko.SlackBuild

76 lines
1.6 KiB
Text
Raw Normal View History

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(date +%Y.%m.%d_%H.%M)
BUILD=1
ARCH=$(uname -m)
2011-07-22 08:41:46 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
2010-10-08 05:13:30 +02:00
mkdir -p $TMP $PKG
# get sources
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES
( cd $REPOSITORIES
if [ -e $REPOSITORIES/$PRGNAM ] ; then
( cd $REPOSITORIES/$PRGNAM
git pull
)
else
git clone http://github.com/rakudo/rakudo.git $REPOSITORIES/$PRGNAM
fi
)
( cd $TMP
rm -fr $PRGNAM-$VERSION && cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION
( cd $PRGNAM-$VERSION
perl Configure.pl \
--prefix=$PREFIX \
--libdir=$PREFIX/lib$(echo $ARCH | grep -o 64) \
--mandir=$PREFIX/man \
--infodir=$PREFIX/info
make
make DESTDIR=$PKG install
)
)
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (Implementation of Perl6)
$PRGNAM:
$PRGNAM: Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://perlcabal.org/syn/
$PRGNAM:
$PRGNAM: http://raduko.org/
$PRGNAM:
EOF
chown -R root:root *
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
( 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
)
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)