slackbuilds/d/raduko/raduko.SlackBuild
Gwenhael Le Moine 7061a4d46f mkdirs
2010-10-08 10:13:30 +07:00

74 lines
1.7 KiB
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(date +%Y.%m.%d_%H.%M)
BUILD=1
PACKAGER=cyco
ARCH=$(uname -m)
REPOSITORIES=/home/cycojesus/projets/packages/repositories
TMP=/tmp/$PACKAGER
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
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 git://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$PACKAGER.txz
)