#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://www.mthoodcards.com/games/ultrasol/home.html # Packager baldelario ~at~ gmail ~dot~ com # http://www.slacky.it NAME=ultrasol VERSION=1.0.2 ARCH=${ARCH:-noarch} BUILD=3bj CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-ultrasol SOURCE=http://www.ibiblio.org/pub/linux/games/solitaires/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.bz2 ]; then wget -c $SOURCE fi rm -rf $PKG mkdir -p -m 755 $PKG/usr/bin \ $PKG/usr/share/applications \ $PKG/usr/share/pixmaps \ $PKG/usr/doc/$NAME-$VERSION cd $TMP cd $PKG/usr/share ; tar xzvf $CWD/$NAME-$VERSION.tar.gz zcat $CWD/*.diff.gz | patch -p0 --verbose || exit 1 cat < $PKG/usr/bin/ultrasol #!/bin/sh # ultrasol startup script python /usr/share/ultrasol/ultrasol.py EOF chmod 755 $PKG/usr/bin/* # Menu-entry cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Name=Ultrasol GenericName=Solitaire game Comment=A collection of nearly 400 different solitaire or patience games Exec=ultrasol Icon=/usr/share/pixmaps/ultrasol.png Type=Application Categories=Qt;KDE;Game;CardGame; X-KDE-StartupNotify=true X-DCOP-ServiceType=Multi EOF cp -a $CWD/*.png $PKG/usr/share/pixmaps 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 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