#!/bin/bash

# Paths to skeleton port's source & real Slackware source tree:
export CWD=$SLACKSOURCE/../extra/source/slacktrack
export PORTCWD=$PWD

# Temporary build locations:
export TMPBUILD=$TMP/build-$PACKAGE
export PKG=$TMP/package-$PACKAGE
mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD

# Extract source:
tar zxvvf $CWD/$PACKAGE-$VERSION-source.tar.gz
cd $PACKAGE

# Delete old package:
if [ "${DELETEOLDPKGS}" = "Yes" ]; then
   rm -f $PKGSTORE/$PKGSERIES/$PACKAGE-*.{tgz,txt};
fi

# Launch real build script:
PKGSTORE=$PKGSTORE/$PKGSERIES ./slacktrack.SlackBuild
