#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://www.yofrankie.org # Packager Andrea Sciucca Gohanz ( gohanz at infinito.it) # http://www.slacky.it # # # Exit on most errors set -e CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/yofrankie NAME=yofrankie VERSION=`date +%Y%m%d` ARCH=${ARCH:-i386} BUILD=1as SOURCE=http://download.blender.org/apricot/$NAME'_'bge.zip if [ ! -e $NAME'_'bge.zip ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP unzip -o $CWD/$NAME'_'bge.zip echo -e "\E[0;32m+-----------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild YoFrankie! |\E[0;0m" echo -e "\E[0;32m+-----------------------------+\E[0;0m" mkdir -p $PKG/usr/bin cat << EOF > $PKG/usr/bin/yofrankie #!/bin/bash cd /usr/share/YoFrankie exec /usr/share/YoFrankie/yofrankie-linux-i386 EOF chmod 755 $PKG/usr/bin/* mkdir -p $PKG/usr/share/YoFrankie cp -r blender_game_engine/{audio,chars,effects,hud,levels,menus,props,textures,yofrankie-linux-i386} $PKG/usr/share/YoFrankie chmod 755 $PKG/usr/share/YoFrankie/yofrankie-linux-i386 # Installing icon and desktop. mkdir -p $PKG/usr/share/pixmaps cp $CWD/yofrankie.png $PKG/usr/share/pixmaps mkdir -p $PKG/usr/share/applications cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Name=Yo Frankie! Name[it]=Yo Frankie! GenericName=A platform game GenericName[it]=Platform game 3D Comment=Yo Frankie! is a 3D current generation platform game Comment[it]=Yo Frankie! รจ un platform game 3D di ultima generazione Exec=yofrankie Icon=yofrankie.png Terminal=false Categories=Application;Game; EOF mkdir -p $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild cd $PKG find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi