#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://www.tweeler.com # 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/GoOllie NAME=GoOllie VERSION=1.30 ARCH=${ARCH:-i686} BUILD=1as if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP echo -e "\E[0;32m+--------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild GoOllie |\E[0;0m" echo -e "\E[0;32m+--------------------------+\E[0;0m" mkdir -p $PKG/usr/bin cat << EOF > $PKG/usr/bin/goollie #!/bin/bash cd /usr/share/GoOllie/bin exec /usr/share/GoOllie/bin/GoOllie EOF chmod 755 $PKG/usr/bin/* # Installing a prebuilt binary, installed by GoOllie installer. mkdir -p $PKG/usr/share ( cd $PKG/usr/share tar xvjf $CWD/$NAME-$VERSION.tar.bz2 ) mkdir -p $PKG/usr/share/applications cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 Name=GoOllie Name[it]=GoOllie GenericName=Mouse controlled platform game GenericName[it]=Platform game controllato dal mouse Comment=The latest innovative mouse controlled platform game Comment[it]=Innovativo gioco controllato dal mouse Icon=/usr/share/pixmaps/goollie.png Exec=goollie Terminal=false StartupNotify=false Categories=Application;Game;ActionGame EOF mkdir -p $PKG/usr/share/pixmaps cp $CWD/goollie.png $PKG/usr/share/pixmaps 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/goollie-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi