Check-in [a478ff4b06]
Overview
Comment:Added support for creating teapot descriptor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a478ff4b065ed0af7b15a2e364a2f821c90a6f30
User & Date: rkeene on 2010-02-05 02:20:41
Other Links: manifest | tags
Context
2010-02-05
02:22
Added catchall for platform check-in: 7a3272e8a7 user: rkeene tags: trunk
02:20
Added support for creating teapot descriptor check-in: a478ff4b06 user: rkeene tags: trunk
01:44
Updated to store build log in output directory check-in: 30541f9462 user: rkeene tags: trunk
Changes

Modified server/work/Makefile from [e6f364d300] to [f2ece7f06f].

     1      1   all: tclpkgs-src-current.tar.gz
     2      2   
     3      3   tclpkgs-src-current.tar.gz: tclpkgs-src-current
     4      4   	tar -zcf tclpkgs-src-current.tar.gz tclpkgs-src-current
     5      5   	rm -rf tclpkgs-src-current
     6      6   
     7         -tclpkgs-src-current: platform build_all.sh */build.sh
            7  +tclpkgs-src-current: platform build_all.sh create_teapot */build.sh
     8      8   	rm -rf tclpkgs-src-current
     9      9   	mkdir tclpkgs-src-current
    10         -	cp -rp platform build_all.sh tclpkgs-src-current/
           10  +	cp -rp platform build_all.sh create_teapot tclpkgs-src-current/
    11     11   	for dir in */; do \
    12     12   		if test ! -f "$$dir/build.sh"; then continue; fi; \
    13     13   		mkdir "tclpkgs-src-current/$$dir"; \
    14     14   		cp "$$dir/build.sh" "tclpkgs-src-current/$$dir"; \
    15     15   	done
    16     16   
    17     17   clean:
    18     18   	rm -f tclpkgs-*.tar.*
    19     19   	rm -rf tclpkgs-src-current
    20     20   	./build_all.sh clean
    21     21   
    22     22   .PHONY: all clean

Added server/work/create_teapot version [7fbee19e66].

            1  +#! /bin/bash
            2  +
            3  +OUTFILE="$1"
            4  +PKG="$2"
            5  +PKGVER="$3"
            6  +SRCURL="$4"
            7  +PLATFORM="$5"
            8  +REQS="$6"
            9  +DESC="$7"
           10  +TMPFILE="${TMPDIR:-/tmp}/reqfile-$$${RANDOM}${RANDOM}${RANDOM}"
           11  +export OUTFILE PKG PKGVER SRCURL PLATFORM REQS DESC TMPFILE
           12  +
           13  +VALIDSYNTAX=1
           14  +if [ -z "${OUTFILE}" ]; then
           15  +	echo 'ERROR: Output not specified' >&2
           16  +	VALIDSYNTAX=0
           17  +fi
           18  +if [ -z "${PKG}" ]; then
           19  +	echo 'ERROR: Package not specified' >&2
           20  +	VALIDSYNTAX=0
           21  +fi
           22  +if [ -z "${PKGVER}" ]; then
           23  +	echo 'ERROR: Package version not specified' >&2
           24  +	VALIDSYNTAX=0
           25  +fi
           26  +if [ -z "${PLATFORM}" ]; then
           27  +	echo 'ERROR: Platform not specified' >&2
           28  +	VALIDSYNTAX=0
           29  +fi
           30  +if [ -z "${DESC}" ]; then
           31  +	echo 'ERROR: Description not specified' >&2
           32  +	VALIDSYNTAX=0
           33  +fi
           34  +if [ "${VALIDSYNTAX}" = "0" ]; then
           35  +	echo 'Usage: create_teapot <output> <pkg> <pkgver> <srcurl> <platform> <reqs> <desc>' >&2
           36  +	exit 1
           37  +fi
           38  +
           39  +OUTSHORT=$(echo "${OUTFILE}" | sed 's@^.*/@@')
           40  +TEXTFILE=0
           41  +if [ "${OUTSHORT}" = "teapot.txt" ]; then
           42  +	TEXTFILE=1
           43  +fi
           44  +if [ ! -e "${OUTFILE}" ]; then
           45  +	TEXTFILE=1
           46  +fi
           47  +
           48  +rm -f "${TMPFILE}"
           49  +cat << __EOF__ > "${TMPFILE}"
           50  +Package ${PKG} ${PKGVER}
           51  +Meta platform           ${PLATFORM}
           52  +Meta rsk::build::date   $(date +%Y-%m-%d)
           53  +Meta description        ${DESC}
           54  +__EOF__
           55  +echo "${REQS}" | tr ',' "\n" | while read req; do
           56  +	req="$(echo "${req}" | sed 's@^ *@@;s@ *$@@')"
           57  +	if [ -z "${req}" ]; then
           58  +		continue
           59  +	fi
           60  +
           61  +	if echo "${req}" | grep ' ' >/dev/null; then
           62  +		req="{${req}}"
           63  +	fi
           64  +
           65  +	echo "Meta require            ${req}" >> "${TMPFILE}"
           66  +done
           67  +
           68  +if [ "${TEXTFILE}" = "1" ]; then
           69  +	cat "${TMPFILE}" > "${OUTFILE}"
           70  +else
           71  +	(
           72  +		head -1 "${OUTFILE}"
           73  +		echo ''
           74  +		echo '# @@ Meta Begin'
           75  +		sed 's@^@# @' "${TMPFILE}"
           76  +		echo '# @@ Meta End'
           77  +		echo ''
           78  +		tail +2 "${OUTFILE}"
           79  +	) > "${OUTFILE}.new"
           80  +	cat "${OUTFILE}.new" > "${OUTFILE}"
           81  +	rm -f "${OUTFILE}.new"
           82  +fi
           83  +
           84  +rm -f "${TMPFILE}"

Modified server/work/tls/build.sh from [94a2a79b39] to [d44be617e2].

    45     45   
    46     46   (
    47     47   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    48     48   
    49     49   	cp "build/${BUILDDIR}/libtls1.6.so" "${PLATDIR}/"
    50     50   	cp "build/${BUILDDIR}/pkgIndex.tcl" "${PLATDIR}/"
    51     51   	cp "build/${BUILDDIR}/tls.tcl" "${PLATDIR}/"
           52  +
           53  +	../create_teapot "${PLATDIR}/teapot.txt" "tls" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "SSL TLS Secure Sockets"
    52     54   ) || exit 1
    53     55   
    54     56   exit 0