+##############################################################################
+# Building section
+# You probably don't have to touch anything after this
+##############################################################################
+
+# Fetch a versioned file from a URL
+function fetch {
+ if [ ! -e ${STAMPS}/$1.fetch ]; then
+ log "Downloading $1 sources..."
+ wget -c --no-passive-ftp $2
+ touch ${STAMPS}/$1.fetch
+ fi
+}
+
+# Log a message out to the console
+function log {
+ echo "******************************************************************"
+ echo "* $*"
+ echo "******************************************************************"
+}
+
+# Unpack an archive
+function unpack {
+ log Unpacking $*
+ # Use 'auto' mode decompression. Replace with a switch if tar doesn't support -a
+ tar xaf${TARFLAGS} ${SOURCES}/$1.tar.*
+}
+
+# Install a build
+function install {
+ log $1
+ ${SUDO} make ${MAKEFLAGS} $2 $3 $4 $5 $6 $7 $8
+}