#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) BRANCH=trunk VERSION=$BRANCH$(date +%Y.%m.%d_%H.%M) BUILD=1 ARCH=$(uname -m) REPOSITORIES=/home/cycojesus/projets/packages/repositories TAG=cyco TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr # cleaning rm -fr $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/parrot/parrot.git parrot fi ) mkdir -p $TMP ( 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 mkdir -p $PKG/$PREFIX/doc/ ( cd $PKG/$PREFIX/doc ln -s ../share/doc/parrot $PRGNAM-$VERSION ) ) ) ( cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM (Virtual Machine) $PRGNAM: $PRGNAM: Parrot is a virtual machine designed to efficiently compile and execute $PRGNAM: bytecode for dynamic languages. Parrot currently hosts a variety of $PRGNAM: language implementations in various stages of completion, including Tcl, $PRGNAM: Javascript, Ruby, Lua, Scheme, PHP, Python, Perl 6, APL, and a .NET $PRGNAM: bytecode translator. Parrot is not about parrots, though we are rather $PRGNAM: fond of them for obvious reasons. $PRGNAM: $PRGNAM: http://parrot.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 )