#!/bin/bash
# build LabPlot .tar.gz package on Slackware 10
# Stefan Gerlach, 19.12.04

LVERSION=1.5.1.rc2

export CFLAGS="-O2"
export CXXFLAGS="-O2"
ARCH=i386
################################
DIR=LabPlot-"$LVERSION"
SRC=LabPlot-"$LVERSION".tar.bz2
BUILDDIR=/tmp/slackpack

if [ ! -f "$SRC" ] ; then
	echo "$SRC not found!"
	exit
fi

rm -rf $BUILDDIR

tar jxvf $SRC

cd $DIR
./configure --prefix=/opt/kde --disable-static --enable-final
time make
make DESTDIR=$BUILDDIR install

cd $BUILDDIR

makepkg LabPlot-"$LVERSION"-"$ARCH"-1.tgz

mv $BUILDDIR/*.tgz ~
