#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://qwtplot3d.sourceforge.net/ # Packagers Gohanz ( gohanz@infinito.ii) # http://www.slacky.it CWD=`pwd` if ["$TMP" = ""]; then TMP=/tmp fi PKG=$TMP/package-qwtplot3d NAME=qwtplot3d VERSION=0.2.6 ARCH=${ARCH:-i686} BUILD=2as if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tgz cd $NAME qmake qwtplot3d.pro make cd examples qmake examples.pro make mkdir -p $PKG/usr/doc/$NAME-$VERSION cd $CWD cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc mkdir -p $PKG/usr/lib mkdir -p $PKG/usr/include mkdir -p $PKG/usr/doc/$NAME-$VERSION/examples cp -f -d $TMP/$NAME/lib/* $PKG/usr/lib cp -f $TMP/$NAME/include/* $PKG/usr/include cp -f $TMP/$NAME/examples/bin/* $PKG/usr/doc/$NAME-$VERSION/examples cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null chown -R root:root . requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME rm -rf $PKG fi