#!/bin/sh -x
#######################################################################
# Program: trackbuild.webalizer
# Purpose: Launch webalizer build script from slacktrack
# Author : Stuart Winter <stuart@polplex.co.uk>
#######################################################################

PACKAGE=webalizer
VERSION=2.01_10
ARCH=i486
BUILD=2
SLACKPACKAGE="${PACKAGE}-${VERSION}-${ARCH}-${BUILD}.tgz"

# Resting place for newly built Slackware packages
BUILDSTORE=/tmp/built-slackwarepackages/
mkdir -pm700 ${BUILDSTORE}

which slacktrack >/dev/null 2>&1 || { echo "slacktrack not installed.  Cannot build without it" ; exit 1 ;}

./source.download

# We rely on my Slackware 'gd' package being installed.
# Previously we used to use my 'gdstaticperl' package
# but this won't build on Slackware 9.1 (and was broken even before then)
# plus it's the 1.8.? version of gd.  This version is gd2
# We also need Slackware's db1 package in order to build with DNS support.
slacktrack --showdeps -d "gd,db1" -Qnp ${SLACKPACKAGE} "/bin/sh -x webalizer.build ${VERSION}"


#EOF

# We don't really depend on my gdstatic perl package but it has a copy of
# the GD library.  You could change webalizer.build to build its own version
# of gd and compile against it, but it's easier to install this package, plus
# all the shell boxen have it anyway.
#-d "gdstaticperl" 

