ENH: Moved build of source tarball to package script.

This commit is contained in:
Brad King 2002-08-28 15:08:18 -04:00
parent d0be2896d7
commit 1168d5a85d
4 changed files with 29 additions and 26 deletions

View File

@ -4,6 +4,8 @@ VERSION="1.4-4"
PLATFORM="x86-cygwin"
DOC_DIR="/doc/cmake-${VERSION}"
FIND="/usr/bin/find"
CREATE_SOURCE_TARBALL="yes"
SOURCE_TARBALL_NAME="cmake-$VERSION"
CreateExtraFiles()
{
@ -19,10 +21,10 @@ CreatePackage()
{
echo "Creating cmake-$VERSION-$PLATFORM.tar"
cd ${INSTALL_DIR}
if ${TAR} cvf ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar ${PREFIX} \
if ${TAR} cvf ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar .${PREFIX} \
> ${LOG_DIR}/cmake-$VERSION-$PLATFORM-cygwin.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/cmake-$VERSION-$PLATFORM-cygwin.log"
exit 1
fi
bzip2 ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar
}
}

View File

@ -29,25 +29,6 @@ if test ! -d ${SOURCE_DIR} ; then
mv CMake CMake-$VERSION
fi
# Make the source tarball if requested.
if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then
TARBALL="${TARBALL_DIR}/CMake$VERSION-src-unix.tar"
echo "Creating CMake$VERSION-src-unix.tar"
if ${TAR} cvf $TARBALL CMake-$VERSION \
> ${LOG_DIR}/CMake$VERSION-src-unix.log 2>&1 ; then : ; else
"Error, see ${LOG_DIR}/CMake$VERSION-src-unix.log"
exit 1
fi
if test "x${GZIP}" != "x" ; then
echo "Creating $TARBALL.gz"
${GZIP} -c $TARBALL > $TARBALL.gz
fi
if test "x${COMPRESS}" != "x" ; then
echo "Creating $TARBALL.Z"
${COMPRESS} $TARBALL
fi
fi
# Build the release.
cd ${BUILD_DIR}
echo "Writing CMakeCache.txt..."

View File

@ -83,3 +83,7 @@ SOURCE_DIR="${RELEASE_ROOT}/CMake-$VERSION"
BUILD_DIR="${RELEASE_ROOT}/CMake-$VERSION-$PLATFORM-build"
LOG_DIR="${RELEASE_ROOT}/Logs"
INSTALL_OPTIONS="DESTDIR=\"${INSTALL_DIR}\""
if [ -z "$SOURCE_TARBALL_NAME" ]; then
SOURCE_TARBALL_NAME="CMake$VERSION-src-unix"
fi

View File

@ -12,8 +12,8 @@ SELFPATH=`cd \`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
. ${SELFPATH}/cmake_release_unix_config.sh
# Cleanup from possible previous run.
rm -rf ${INSTALL_DIR}
mkdir -p ${INSTALL_DIR}
rm -rf ${INSTALL_DIR} ${TARBALL_DIR}
mkdir -p ${INSTALL_DIR} ${TARBALL_DIR}
# Run the installation.
cd ${BUILD_DIR}
@ -31,6 +31,25 @@ if ${STRIP} ${INSTALL_DIR}${PREFIX}/bin/* \
exit 1
fi
# Make the source tarball if requested.
if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then
TARBALL="${TARBALL_DIR}/${SOURCE_TARBALL_NAME}.tar"
echo "Creating ${SOURCE_TARBALL_NAME}.tar"
if ${TAR} cvf $TARBALL CMake-$VERSION \
> ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log"
exit 1
fi
if test "x${GZIP}" != "x" ; then
echo "Creating $TARBALL.gz"
${GZIP} -c $TARBALL > $TARBALL.gz
fi
if test "x${COMPRESS}" != "x" ; then
echo "Creating $TARBALL.Z"
${COMPRESS} $TARBALL
fi
fi
# Let the configuration file add some files.
CreateExtraFiles
@ -70,7 +89,6 @@ ${FILES}
EOF
TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar"
[ -e $TARBALL ] && rm -rf $TARBALL
echo "Creating CMake$VERSION-$PLATFORM.tar"
if ${TAR} cvf $TARBALL README ${INTERNAL_NAME}.tar \
> ${LOG_DIR}/CMake$VERSION-$PLATFORM.log 2>&1 ; then : ; else
@ -80,12 +98,10 @@ fi
if test "x${GZIP}" != "x" ; then
echo "Creating $TARBALL.gz"
[ -e $TARBALL.gz ] && rm -rf $TARBALL.gz
${GZIP} -c $TARBALL > $TARBALL.gz
fi
if test "x${COMPRESS}" != "x" ; then
echo "Creating $TARBALL.Z"
[ -e $TARBALL.Z ] && rm -rf $TARBALL.Z
${COMPRESS} $TARBALL
fi