Index: .fossil-settings/ignore-glob ================================================================== --- .fossil-settings/ignore-glob +++ .fossil-settings/ignore-glob @@ -1,2 +1,8 @@ client/teapot-client.kit client/teapot-client.kit/* +server/work/tls/build +server/work/tls/build/* +server/work/tls/out +server/work/tls/out/* +server/work/tls/src +server/work/tls/src/* ADDED server/work/platform Index: server/work/platform ================================================================== --- /dev/null +++ server/work/platform @@ -0,0 +1,38 @@ +#! /bin/bash + +case "`uname -s`" in + Linux) + GLIBCVERS=$(strings /lib/libc.so.6 | grep '^GLIBC_[0-9][0-9]*\.[0-9]*' | cut -f 2- -d _ | cut -f 1-2 -d . | sed 's@\.@ @g' | sort -n +0 +1 | tail -1 | sed 's@ @\.@g') + + case "`uname -m`" in + i?86) + CPUPLAT="ix86" + ;; + sun4?) + CPUPLAT="sparc" + ;; + *) + CPUPLAT="`uname -m`" + ;; + esac + + echo "linux-glibc${GLIBCVERS}-${CPUPLAT}" + ;; + SunOS) + SUNMAJVER=$(uname -r | cut -f 1 -d .) + SUNMINVER=$(uname -r | cut -f 2 -d .) + SOLVER="$[${SUNMAJVER} - 3].${SUNMINVER}" + + + case "`uname -m`" in + sun4?) + CPUPLAT="sparc" + ;; + *) + CPUPLAT="ix86" + ;; + esac + + echo "solaris${SOLVER}-${CPUPLAT}" + ;; +esac ADDED server/work/tls/build.sh Index: server/work/tls/build.sh ================================================================== --- /dev/null +++ server/work/tls/build.sh @@ -0,0 +1,50 @@ +#! /bin/bash + +if [ ! -x "../platform" ]; then + echo "No platform script found, aborting." >&2 + + exit 1 +fi + +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}" +PLATFORM="$(../platform)" +PLATDIR="out/${PLATFORM}" + +export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR + +if [ ! -f "${SRC}" ]; then + mkdir src >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + rm -rf build + mkdir build + cd build/ || exit 1 + + tar -zxf "../${SRC}" + cd "${BUILDDIR}" || exit 1 + + mkdir "${WORKDIR}" + + ./configure --enable-shared --prefix="${WORKDIR}" + gmake || exit 1 + + rm -rf "${WORKDIR}" +) || exit 1 + +( + rm -rf "${PLATDIR}" + mkdir -p "${PLATDIR}" + + cp "build/${BUILDDIR}/libtls1.6.so" "${PLATDIR}/" + cp "build/${BUILDDIR}/pkgIndex.tcl" "${PLATDIR}/" + cp "build/${BUILDDIR}/tls.tcl" "${PLATDIR}/" +) || exit 1 + +exit 0