Index: common/post/sdk.sh ================================================================== --- common/post/sdk.sh +++ common/post/sdk.sh @@ -12,10 +12,11 @@ rm -rf '__tmp__' mkdir '__tmp__' mkdir '__tmp__/include' mkdir '__tmp__/lib' +mkdir '__tmp__/doc' cp 'tcl/inst/lib/tclConfig.sh' '__tmp__/lib/' cp -rp 'tcl/inst/include'/* '__tmp__/include/' cp 'tcl/inst/lib'/libtclstub* '__tmp__/lib/' @@ -24,10 +25,41 @@ cp -rp 'tk/inst/include'/* '__tmp__/include/' cp 'tk/inst/lib'/libtkstub* '__tmp__/lib/' fi cp 'kitsh/build'/kitsh-*/libtclkit* '__tmp__/lib/' + +for dir in */; do + if [ ! -d "${dir}/build" ]; then + continue + fi + + project="$(basename "${dir}")" + projdir="$(cd "${dir}/build"/* >/dev/null || exit; /bin/pwd)" + docdir="__tmp__/doc/${project}" + + if [ ! -d "${projdir}" ]; then + continue + fi + + mkdir -p "${docdir}" + + case "${project}" in + itcl|tcl|tk) + cp "${projdir}/doc/license.terms" "${docdir}/" + ;; + tclvfs|kitsh|metakit|thread) + cp "${projdir}/license.terms" "${docdir}/" + ;; + zlib) + cp "${projdir}/README" "${docdir}/" + ;; + *) + cp "${projdir}/README" "${projdir}/LICENSE" "${projdir}/doc/README" "${projdir}/doc/LICENSE" "${projdir}/license.terms" "${projdir}/doc/license.terms" "${docdir}/" >/dev/null 2>/dev/null + ;; + esac +done ( cd '__tmp__/lib' || exit 1 for kitlibfile in libtclkit*.dll libtclkit*; do @@ -73,13 +105,13 @@ ( cd '__tmp__' || exit 1 mkdir "libtclkit-sdk-${TCLVERS}" - mv 'lib' 'include' "libtclkit-sdk-${TCLVERS}/" + mv 'lib' 'include' 'doc' "libtclkit-sdk-${TCLVERS}/" tar -cf - "libtclkit-sdk-${TCLVERS}" | gzip -9c > "../libtclkit-sdk-${TCLVERS}.tar.gz" ) rm -rf '__tmp__' exit 0