1
0
mirror of https://github.com/pocoproject/poco.git synced 2025-03-22 23:22:20 +01:00

added release scripts

This commit is contained in:
Guenter Obiltschnig 2008-06-09 18:42:07 +00:00
parent 076c301460
commit c23141fa4d
16 changed files with 711 additions and 8 deletions

@ -1,4 +1,4 @@
Net
Util
XML
Foundation
Net
Util
XML
Foundation

@ -1,4 +1,4 @@
Net
Util
XML
Foundation
Net
Util
XML
Foundation

2
Data/ODBC/dependencies Normal file

@ -0,0 +1,2 @@
Foundation
Data

2
Data/SQLite/dependencies Normal file

@ -0,0 +1,2 @@
Foundation
Data

1
Data/dependencies Normal file

@ -0,0 +1 @@
Foundation

@ -0,0 +1,2 @@
Data
Data/SQLite

1
Net/dependencies Normal file

@ -0,0 +1 @@
Foundation

3
Net/samples/dependencies Normal file

@ -0,0 +1,3 @@
Foundation
XML
Util

@ -0,0 +1,3 @@
Foundation
Net
Util

2
Util/dependencies Normal file

@ -0,0 +1,2 @@
Foundation
XML

1
XML/dependencies Normal file

@ -0,0 +1 @@
Foundation

184
release/script/cpproj Executable file

@ -0,0 +1,184 @@
#! /bin/sh
#
# $Id: //poco/1.3/release/script/cpproj#2 $
#
# cpproj
#
# Copy project files
#
# usage: copyproj <src> <dest>
#
src=$1
dst=$2
if [ "$src" = "" ] ; then
echo "usage: $0 <source> <destination>"
exit 1
fi
if [ "$dst" = "" ] ; then
echo "usage: $0 <source> <destination>"
exit 1
fi
mkdir -p ${dst}
mkdir -p ${dst}/src
if [ -d ${src}/include ] ; then
mkdir -p ${dst}/include
cp -R ${src}/include/* ${dst}/include
fi
cp ${src}/src/* ${dst}/src
cp ${src}/*.sln ${dst}
cp ${src}/*.vcproj ${dst}
cp ${src}/Makefile* ${dst}
if [ "`find ${src} -name '*.vmsbuild'`" != "" ] ; then
cp ${src}/*.vmsbuild ${dst}
fi
if [ "`find ${src} -name '*.bndlspec'`" != "" ] ; then
cp ${src}/*.bndlspec ${dst}
fi
if [ -f ${src}/.project ] ; then
cp ${src}/.project ${dst}
cp ${src}/.cdtproject ${dst}
fi
if [ -d ${src}/doc ] ; then
mkdir -p ${dst}/doc
cp -R ${src}/doc/* ${dst}/doc
fi
if [ -d ${src}/templates ] ; then
mkdir -p ${dst}/templates
cp -R ${src}/templates/* ${dst}/templates
fi
if [ -d ${src}/testsuite ] ; then
mkdir -p ${dst}/testsuite
mkdir -p ${dst}/testsuite/src
if [ -d ${src}/testsuite/data ] ; then
mkdir -p ${dst}/testsuite/data
cp -R ${src}/testsuite/data/* ${dst}/testsuite/data
fi
if [ -d ${src}/testsuite/bundles ] ; then
mkdir -p ${dst}/testsuite/bundles
cp -R ${src}/testsuite/bundles/* ${dst}/testsuite/bundles
fi
cp ${src}/testsuite/src/* ${dst}/testsuite/src
cp ${src}/testsuite/*.vcproj ${dst}/testsuite
cp ${src}/testsuite/Makefile* ${dst}/testsuite
if [ "`find ${src}/testsuite -name '*.vmsbuild'`" != "" ] ; then
cp ${src}/testsuite/*.vmsbuild ${dst}/testsuite
fi
if [ "`find ${src}/testsuite -name '*.opt'`" != "" ] ; then
cp ${src}/testsuite/*.opt ${dst}/testsuite
fi
if [ "`find ${src}/testsuite -name '*.properties'`" != "" ] ; then
cp ${src}/testsuite/*.properties ${dst}/testsuite
fi
if [ "`find ${src}/testsuite -name '*.xml'`" != "" ] ; then
cp ${src}/testsuite/*.xml ${dst}/testsuite
fi
if [ "`find ${src}/testsuite -name '*.pem'`" != "" ] ; then
cp ${src}/testsuite/*.pem ${dst}/testsuite
fi
fi
if [ -d ${src}/bundle ] ; then
mkdir -p ${dst}/bundle
cp -R ${src}/bundle/* ${dst}/bundle
fi
if [ -d ${src}/res ] ; then
mkdir -p ${dst}/res
cp -R ${src}/res/* ${dst}/res
fi
if [ -d ${src}/samples ] ; then
mkdir -p ${dst}/samples
cp ${src}/samples/*.sln ${dst}/samples
cp ${src}/samples/Makefile* ${dst}/samples
samples=`find ${src}/samples -maxdepth 1 -mindepth 1 -type d -print | sed "s:^.*/::"`
for sample in $samples ;
do
if [ -d "${src}/samples/${sample}/src" ] ; then
mkdir -p ${dst}/samples/${sample}
if [ -d ${src}/samples/${sample}/src ] ; then
mkdir -p ${dst}/samples/${sample}/src
cp ${src}/samples/${sample}/src/* ${dst}/samples/${sample}/src
fi
if [ -d ${src}/samples/${sample}/bundle ] ; then
mkdir -p ${dst}/samples/${sample}/bundle
cp -R ${src}/samples/${sample}/bundle/* ${dst}/samples/${sample}/bundle
fi
if [ -d ${src}/samples/${sample}/res ] ; then
mkdir -p ${dst}/samples/${sample}/res
cp -R ${src}/samples/${sample}/res/* ${dst}/samples/${sample}/res
fi
cp ${src}/samples/${sample}/*.vcproj ${dst}/samples/${sample}
cp ${src}/samples/${sample}/Makefile* ${dst}/samples/${sample}
if [ "`find ${src}/samples/${sample}/ -name '*.vmsbuild'`" != "" ] ; then
cp ${src}/samples/${sample}/*.vmsbuild ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.opt'`" != "" ] ; then
cp ${src}/samples/${sample}/*.opt ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.properties'`" != "" ] ; then
cp ${src}/samples/${sample}/*.properties ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.ini'`" != "" ] ; then
cp ${src}/samples/${sample}/*.ini ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.xml'`" != "" ] ; then
cp ${src}/samples/${sample}/*.xml ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.wsdl'`" != "" ] ; then
cp ${src}/samples/${sample}/*.wsdl ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.pem'`" != "" ] ; then
cp ${src}/samples/${sample}/*.pem ${dst}/samples/${sample}
fi
if [ "`find ${src}/samples/${sample}/ -name '*.bndlspec'`" != "" ] ; then
cp ${src}/samples/${sample}/*.bndlspec ${dst}/samples/${sample}
fi
if [ -d ${src}/samples/${sample}/include ] ; then
mkdir -p ${dst}/samples/${sample}/include
cp -R ${src}/samples/${sample}/include/* ${dst}/samples/${sample}/include
fi
if [ -d ${src}/samples/${sample}/bin ] ; then
mkdir -p ${dst}/samples/${sample}/bin
if [ "`find ${src}/samples/${sample}/bin/ -name '*.properties'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.properties ${dst}/samples/${sample}/bin
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.ini'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.ini ${dst}/samples/${sample}/bin
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.xml'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.xml ${dst}/samples/${sample}/bin
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.wsdl'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.wsdl ${dst}/samples/${sample}/bin
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.pem'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.pem ${dst}/samples/${sample}/bin
fi
fi
else
mkdir -p ${dst}/samples/${sample}
cp -R ${src}/samples/${sample}/* ${dst}/samples/${sample}
fi
done
fi

77
release/script/mkrel Executable file

@ -0,0 +1,77 @@
#! /bin/sh
#
# $Id: //poco/1.3/release/script/mkrel#3 $
#
# mkrel
#
# Create a release for distribution.
# This is a wrapper for mkrelease that syncs to the
# Perforce head revision, reads the current
# version from $POCO_BASE/VERSION and requires a release
# specification (loaded from $POCO_BASE/release/spec/*.release)
# as argument.
#
# usage: mkrel [<specfile>]
#
if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set."
exit 1
fi
cd $POCO_BASE
if [ ! -f VERSION ] ; then
echo "Error: No VERSION file found."
exit 2
fi
case `uname` in
CYGWIN*) cygwin=1
;;
*) cygwin=""
;;
esac
if [ "$1" != "" ] ; then
relspec="-f release/spec/$1.release"
reltag="-$1"
else
relspec=""
reltag=""
fi
if [ $cygwin ] ; then
export PWD=`cygpath -w $POCO_BASE`
fi
#
# Sync files
#
echo "Syncing files..."
if [ -d ".svn" ] ; then
svn up
else
p4 sync ./...
fi
read version <$POCO_BASE/VERSION
release=$version$reltag
#
# Build release
#
echo "Building release $release"
rm -rf releases/poco-$release.*
$POCO_BASE/release/script/mkrelease $release $relspec
#
# Copy archive
#
echo "Uploading archive..."
if [ $cygwin ] ; then
$POCO_BASE/release/script/upload $version releases/poco-$release.zip
else
$POCO_BASE/release/script/upload $version releases/poco-$release.tar.*
fi

420
release/script/mkrelease Executable file

@ -0,0 +1,420 @@
#! /bin/sh
#
# $Id: //poco/1.3/release/script/mkrelease#1 $
#
# mkrelease
#
# Create a release for distribution.
#
# usage: mkrelease [-i] [-f specfile] <version> [<component>...]
#
if [ "$1" = "" ] ; then
echo "usage: $0 [-i] <version> [<component>...]"
echo " -i - include intenal tools"
echo " -f specfile - read component list from specfile"
echo " -o dir - specify output directory"
echo " -l - include licensing"
exit 1
fi
comps="Foundation XML Util Net"
internal=0
specfile=""
version=""
output=""
licensingDep=""
while [ "$1" != "" ] ;
do
if [ "$1" = "-i" ] ; then
shift
internal=1
elif [ "$1" = "-f" ] ; then
shift
specfile=$1
shift
elif [ "$1" = "-o" ] ; then
shift
output=$1
shift
elif [ "$1" = "-l" ] ; then
shift
licensingDep="Licensing-libexec"
comps="$comps Licensing"
elif [ "$version" = "" ] ; then
version=$1
shift
else
comps="$comps $1"
shift
fi
done
if [ "$specfile" != "" ] ; then
while read c
do
comps="$comps $c"
done <$specfile
fi
if [ "$version" = "" ] ; then
echo "Error: no version specified."
exit 1
fi
if [ "$output" != "" ] ; then
target=$output
else
target=$POCO_BASE/releases/poco-${version}
fi
mkdir -p ${target}
mkdir -p ${target}/doc
mkdir -p ${target}/contrib
#
# readme files, etc.
#
echo ${version} "(`date +%Y-%m-%d`)" >${target}/VERSION
cp ${POCO_BASE}/dist/LICENSE ${target}
cp ${POCO_BASE}/dist/NEWS ${target}
cp ${POCO_BASE}/dist/README ${target}
cp ${POCO_BASE}/dist/CHANGELOG ${target}
cp ${POCO_BASE}/dist/CONTRIBUTORS ${target}
cp ${POCO_BASE}/doc/Acknowledgements.html ${target}/doc
cp -R ${POCO_BASE}/contrib/* ${target}/contrib
#
# build system
#
mkdir -p ${target}/build/config
mkdir -p ${target}/build/rules
mkdir -p ${target}/build/script
mkdir -p ${target}/build/vms
cp ${POCO_BASE}/build/config/* ${target}/build/config
cp ${POCO_BASE}/build/rules/* ${target}/build/rules
cp ${POCO_BASE}/build/script/makedepend.* ${target}/build/script
cp ${POCO_BASE}/build/script/makeldpath ${target}/build/script
cp ${POCO_BASE}/build/script/shlibln ${target}/build/script
cp ${POCO_BASE}/build/script/projname ${target}/build/script
cp ${POCO_BASE}/build/vms/* ${target}/build/vms
cp ${POCO_BASE}/dist/build_vs71.cmd ${target}
cp ${POCO_BASE}/dist/build_vs80.cmd ${target}
cp ${POCO_BASE}/dist/configure ${target}
cp ${POCO_BASE}/buildvms.com ${target}
cp ${POCO_BASE}/libversion ${target}
if [ $internal = 1 ] ; then
cp ${POCO_BASE}/build/script/testall ${target}/build/script
cp ${POCO_BASE}/build/script/waitfortest ${target}/build/script
fi
#
# CppUnit
#
mkdir -p ${target}/CppUnit
mkdir -p ${target}/CppUnit/doc
mkdir -p ${target}/CppUnit/include/CppUnit
mkdir -p ${target}/CppUnit/src
mkdir -p ${target}/CppUnit/WinTestRunner
mkdir -p ${target}/CppUnit/WinTestRunner/include/WinTestRunner
mkdir -p ${target}/CppUnit/WinTestRunner/src
mkdir -p ${target}/CppUnit/WinTestRunner/res
cp ${POCO_BASE}/CppUnit/doc/* ${target}/CppUnit/doc
cp ${POCO_BASE}/CppUnit/include/CppUnit/* ${target}/CppUnit/include/CppUnit
cp ${POCO_BASE}/CppUnit/src/* ${target}/CppUnit/src
cp ${POCO_BASE}/CppUnit/*.sln ${target}/CppUnit
cp ${POCO_BASE}/CppUnit/*.vcproj ${target}/CppUnit
cp ${POCO_BASE}/CppUnit/Makefile ${target}/CppUnit
cp ${POCO_BASE}/CppUnit/*.vmsbuild ${target}/CppUnit
cp ${POCO_BASE}/CppUnit/WinTestRunner/include/WinTestRunner/* ${target}/CppUnit/WinTestRunner/include/WinTestRunner
cp ${POCO_BASE}/CppUnit/WinTestRunner/src/* ${target}/CppUnit/WinTestRunner/src
cp ${POCO_BASE}/CppUnit/WinTestRunner/res/WinTestRunner.rc ${target}/CppUnit/WinTestRunner/res
cp ${POCO_BASE}/CppUnit/WinTestRunner/res/Resource.h ${target}/CppUnit/WinTestRunner/res
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.vcproj ${target}/CppUnit/WinTestRunner
#
# Copy components
#
for comp in $comps ;
do
cpproj ${POCO_BASE}/$comp ${target}/$comp
done
#
# Create components file
#
for comp in $comps ;
do
echo $comp >>${target}/components
done
echo "CppUnit" >>${target}/components
#
# Make all files writeable
#
chmod -R +w ${target}
#
# Generate Makefile
#
cat >${target}/Makefile <<'ENDOFSCRIPT'
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
sinclude config.make
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd)
endif
ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local
endif
.PHONY: all libexecs cppunit tests samples install
all: libexecs tests samples
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
ENDOFSCRIPT
echo "COMPONENTS = $comps" >>${target}/Makefile
cat >>${target}/Makefile <<'ENDOFSCRIPT'
cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/bin
for comp in $(COMPONENTS) ; do \
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
fi ; \
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -Rf {} $(INSTALLDIR)/bin \; ; \
fi ; \
done
find $(POCO_BUILD)/lib -name "libPoco*" -exec cp -Rf {} $(INSTALLDIR)/lib \;
ENDOFSCRIPT
libexecs=""
tests=""
samples=""
for comp in $comps ;
do
libexecs="$libexecs ${comp}-libexec"
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
tests="$tests ${comp}-tests"
fi
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
samples="$samples ${comp}-samples"
fi
done
echo ".PHONY:$libexecs" >>${target}/Makefile
echo ".PHONY:$tests" >>${target}/Makefile
echo ".PHONY:$samples" >>${target}/Makefile
echo "" >>${target}/Makefile
echo "libexecs:$libexecs" >>${target}/Makefile
echo "tests:$tests" >>${target}/Makefile
echo "samples:$samples" >>${target}/Makefile
for comp in $comps ;
do
if [ `grep -c POCO_LICENSING "${POCO_BASE}/${comp}/Makefile"` != 0 ] ; then
dependencies=$licensingDep
else
dependencies=""
fi
if [ -f "${POCO_BASE}/${comp}/dependencies" ] ; then
for dep in `cat "${POCO_BASE}/${comp}/dependencies"` ;
do
dependencies="$dependencies ${dep}-libexec"
done
fi
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-libexec: $dependencies
\$(MAKE) -C \$(POCO_BASE)/${comp}
ENDOFSCRIPT
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-tests: ${comp}-libexec cppunit
\$(MAKE) -C \$(POCO_BASE)/${comp}/testsuite
ENDOFSCRIPT
fi
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
sdependencies=""
if [ -f "${POCO_BASE}/${comp}/samples/dependencies" ] ; then
for dep in `cat "${POCO_BASE}/${comp}/samples/dependencies"` ;
do
sdependencies="$sdependencies ${dep}-libexec"
done
fi
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-samples: ${comp}-libexec $sdependencies
\$(MAKE) -C \$(POCO_BASE)/${comp}/samples
ENDOFSCRIPT
fi
done
#
# Create Visual Studio 7.1 buils script
#
cat >${target}/build_vs71.cmd <<'ENDOFSCRIPT'
@echo off
rem
rem build_vs71.cmd
rem
rem command-line build script for VS 7.1 [generated by mkrelease]
rem
rem Change OPENSSL_DIR to match your setup
set OPENSSL_DIR=c:\OpenSSL
set OPENSSL_INCLUDE=%OPENSSL_DIR%\include
set OPENSSL_LIB=%OPENSSL_DIR%\lib\VC
set INCLUDE=%INCLUDE%;%OPENSSL_INCLUDE%
set LIB=%LIB%;%OPENSSL_LIB%
set POCOBASE=%CD%
set PATH=%POCOBASE%\bin;%PATH%
cd CppUnit
devenv /useenv /rebuild debug_shared CppUnit_vs71.sln
devenv /useenv /rebuild release_shared CppUnit_vs71.sln
cd %POCOBASE%
ENDOFSCRIPT
for comp in $comps ;
do
cat >>${target}/build_vs71.cmd <<ENDOFSCRIPT
cd ${comp}
devenv /useenv /rebuild debug_shared `basename ${comp}_vs71.sln`
devenv /useenv /rebuild release_shared `basename ${comp}_vs71.sln`
cd %POCOBASE%
ENDOFSCRIPT
done
for comp in $comps ;
do
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
cat >>${target}/build_vs71.cmd <<ENDOFSCRIPT
cd ${comp}/samples
devenv /useenv /rebuild debug_shared samples_vs71.sln
devenv /useenv /rebuild release_shared samples_vs71.sln
cd %POCOBASE%
ENDOFSCRIPT
fi
done
#
# Create Visual Studio 8 buils script
#
cat >${target}/build_vs80.cmd <<'ENDOFSCRIPT'
@echo off
rem
rem build_vs80.cmd
rem
rem command-line build script for VS 8 [generated by mkrelease]
rem
rem Change OPENSSL_DIR to match your setup
set OPENSSL_DIR=c:\OpenSSL
set OPENSSL_INCLUDE=%OPENSSL_DIR%\include
set OPENSSL_LIB=%OPENSSL_DIR%\lib\VC
set INCLUDE=%INCLUDE%;%OPENSSL_INCLUDE%
set LIB=%LIB%;%OPENSSL_LIB%
set POCOBASE=%CD%
set PATH=%POCOBASE%\bin;%PATH%
cd CppUnit
devenv /useenv /rebuild debug_shared CppUnit_vs80.sln
devenv /useenv /rebuild release_shared CppUnit_vs80.sln
cd %POCOBASE%
ENDOFSCRIPT
for comp in $comps ;
do
cat >>${target}/build_vs80.cmd <<ENDOFSCRIPT
cd ${comp}
devenv /useenv /rebuild debug_shared `basename ${comp}_vs80.sln`
devenv /useenv /rebuild release_shared `basename ${comp}_vs80.sln`
cd %POCOBASE%
ENDOFSCRIPT
done
for comp in $comps ;
do
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
cat >>${target}/build_vs80.cmd <<ENDOFSCRIPT
cd ${comp}/samples
devenv /useenv /rebuild debug_shared samples_vs80.sln
devenv /useenv /rebuild release_shared samples_vs80.sln
cd %POCOBASE%
ENDOFSCRIPT
fi
done
#
# Fix line endings
#
if [ -x /usr/bin/unix2dos ] ; then
/usr/bin/unix2dos ${target}/build_vs71.cmd
/usr/bin/unix2dos ${target}/build_vs80.cmd
fi
#
# Create .tar and .zip archives
#
if [ "$output" = "" ] ; then
cd releases
find ${target}/ -print | sed "s:^${target}/*::" >${target}/MANIFEST
tar cf poco-${version}.tar poco-${version}
gzip poco-${version}.tar
tar cf poco-${version}.tar poco-${version}
bzip2 poco-${version}.tar
if [ -x /usr/bin/zip ] ; then
/usr/bin/zip -r -q poco-${version}.zip poco-${version}
fi
fi
exit 0

@ -0,0 +1,4 @@
NetSSL_OpenSSL
Data
Data/SQLite
Data/ODBC

1
release/spec/ssl.release Normal file

@ -0,0 +1 @@
NetSSL_OpenSSL