#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # # Packager: AsPh4lTo aka albatros_la set -e CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/skysentials NAME=skysentials VERSION=1.0.1 CHOST=i486 ARCH=${ARCH:-i486} BUILD=1la SOURCE=http://www.kolmann.at/philipp/linux/skysentials/$NAME.$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd $TMP tar xzvf $CWD/$NAME-$VERSION.tar.gz || exit 1 cd $NAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild cp -a -r ChangeLog LICENSE README $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/usr/share/$NAME-$VERSION/ cp -a -r *.py $PKG/usr/share/$NAME-$VERSION/ mkdir -p $PKG/usr/bin/ echo "#!/bin/bash python /usr/share/$NAME-$VERSION/skysentials.py " > $PKG/usr/bin/skysentials chown -R root:root $PKG/usr/bin/skysentials chmod a+rx $PKG/usr/bin/skysentials cd $PKG mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/slack-desc cat $CWD/skysentials.SlackBuild > $PKG/usr/doc/skysentials-$VERSION/SlackBuild/skysentials.SlackBuild echo "skype4py >= 1.0.31.0-i486-1hrk skype >= 2.0.0.72-i686-2sl" > $CWD/slack-required makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi