@@ -1,34 +1,23 @@ #! /bin/bash -if [ ! -x "../platform" ]; then - echo "No platform script found, aborting." >&2 - - exit 1 -fi - -if [ "${PLATFORM}" = "tcl" ]; then - rm -rf out - - exit 0 -fi - +# Define parameters VERS=1.6 SRC="src/tls${VERS}-src.tar.gz" SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download" BUILDDIR="tls${VERS}" -WORKDIR="${TMPDIR:-/tmp}/tls-$$${RANDOM}${RANDOM}${RANDOM}" PATCHDIR="$(pwd)/patches" -PLATDIR="$(pwd)/out/${PLATFORM}" - -export VERS SRC SRCURL BUILDDIR WORKDIR PATCHDIR PLATDIR - -if [ ! -f "${SRC}" ]; then - mkdir src >/dev/null 2>/dev/null - - wget -O "${SRC}" "${SRCURL}" || exit 1 -fi +export VERS SRC SRCURL BUILDDIR PATCHDIR + +# Load common functions +source ../common.sh + +# Do not build if the "tcl" platform has been requested +not_platforms 'tcl' + +# Download source +download_src ( rm -rf build mkdir build cd build/ || exit 1