All pastes #409331 Raw Edit

thrice

public shellscript v1 · immutable
#409331 ·published 2007-03-25 16:27 UTC
rendered paste body
#!/bin/sh## Written by hollywoodb (hollywoodb@fastmail.fm)## Feel free to use, modify, redistribute this script.## If you make changes please modify the "Written by"## so that I don't recieve emails about a script I## did not write.  Thanks.## Binary script ported by Andrew Brouwers## Modified by the SlackBuilds.org projectif [ "$(id -u)" != "0" ]; then    echo "This script must be run as root!"    exitfiNAME=qemuVERSION=0.9.0ARCHIVE=tar.gzARCH=${ARCH:-i386} # This is a binary release - leave this beCWD=`pwd`TMP=${TMP:-/tmp/SBo}PKG=${PKG:-$TMP/package-$NAME}OUTPUT=${OUTPUT:-/tmp}BUILD=${BUILD:-1}TAG=${TAG:-_SBo}rm -rf $PKG $TMP/$NAME-$VERSIONmkdir -p $TMP $PKG $OUTPUT $TMP/$NAME-$VERSIONcd $TMP/$NAME-$VERSIONtar zxvf $CWD/$NAME-$VERSION-i386.$ARCHIVE || exit 1chown -R root:root .chmod -R u+w,go+r-w,a-s .# Move stuff to a more reasonable spotcp -r $CWD/* $PKGmv $PKG/usr/local/share/man $PKG/usr/manmv $PKG/usr/local/bin $PKG/usr/bin# A couple documents, at leastinstall -d $PKG/usr/doc/$NAME-$VERSION || exit 1cp $PKG/usr/local/share/doc/qmeu/* $PKG/usr/doc/$NAME-$VERSION/rm -rf $PKG/usr/local/share/docfind $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/nullfind $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/nullfind $PKG/usr/man -type f -exec gzip -9 {} \;for i in `find $PKG/usr/man -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done# Copy slackbuild and slack-desccat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuildmkdir -p $PKG/installcat $CWD/slack-desc > $PKG/install/slack-desccd $PKG/sbin/makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$BUILD$TAG.tgz