2002-08-07 22:12:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# CMake UNIX Release Script.
|
|
|
|
#
|
|
|
|
# Run this in the directory where cmake_release_unix_build was run.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Find our own script's location.
|
|
|
|
SELFPATH=`cd \`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
|
|
|
|
|
|
|
|
# Read the configuration.
|
|
|
|
. ${SELFPATH}/cmake_release_unix_config.sh
|
|
|
|
|
|
|
|
# Cleanup from possible previous run.
|
2002-08-28 19:08:18 +00:00
|
|
|
rm -rf ${INSTALL_DIR} ${TARBALL_DIR}
|
|
|
|
mkdir -p ${INSTALL_DIR} ${TARBALL_DIR}
|
2002-08-07 22:12:36 +00:00
|
|
|
|
|
|
|
# Run the installation.
|
|
|
|
cd ${BUILD_DIR}
|
|
|
|
echo "Running make install ${INSTALL_OPTIONS}..."
|
|
|
|
if ${MAKE} install ${INSTALL_OPTIONS} > ${LOG_DIR}/make_install.log 2>&1 ; then : ; else
|
|
|
|
echo "Error, see ${LOG_DIR}/make_install.log"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Strip the executables.
|
|
|
|
echo "Stripping executables..."
|
|
|
|
if ${STRIP} ${INSTALL_DIR}${PREFIX}/bin/* \
|
|
|
|
> ${LOG_DIR}/strip.log 2>&1 ; then : ; else
|
|
|
|
echo "Error, see ${LOG_DIR}/strip.log"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2002-08-28 19:08:18 +00:00
|
|
|
# Make the source tarball if requested.
|
|
|
|
if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then
|
2002-09-23 12:51:16 +00:00
|
|
|
(
|
|
|
|
cd ${RELEASE_ROOT}
|
2002-08-28 19:08:18 +00:00
|
|
|
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
|
2002-09-23 12:51:16 +00:00
|
|
|
)
|
2002-08-28 19:08:18 +00:00
|
|
|
fi
|
|
|
|
|
2002-08-07 22:12:36 +00:00
|
|
|
# Let the configuration file add some files.
|
2002-09-23 12:51:16 +00:00
|
|
|
cd ${BUILD_DIR}
|
2002-08-07 22:12:36 +00:00
|
|
|
CreateExtraFiles
|
|
|
|
|
|
|
|
# Create the manifest file.
|
|
|
|
echo "Writing MANIFEST..."
|
2002-08-28 13:04:45 +00:00
|
|
|
${MKDIR} -p ${INSTALL_DIR}${PREFIX}${DOC_DIR}
|
|
|
|
${TOUCH} ${INSTALL_DIR}${PREFIX}${DOC_DIR}/MANIFEST
|
2002-08-07 22:12:36 +00:00
|
|
|
cd ${INSTALL_DIR}${PREFIX}
|
|
|
|
FILES=`${FIND} ${INSTALL_SUBDIRS} -type f |sed 's/^\.\///'`
|
2002-08-28 13:04:45 +00:00
|
|
|
${CAT} >> ${INSTALL_DIR}${PREFIX}${DOC_DIR}/MANIFEST <<EOF
|
2002-08-07 22:12:36 +00:00
|
|
|
${FILES}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Allow the configuration to create package files if it wants to do so.
|
|
|
|
CreatePackage
|
|
|
|
|
|
|
|
# Create the release tarballs.
|
2002-08-21 19:52:04 +00:00
|
|
|
INTERNAL_NAME="cmake-$VERSION-$PLATFORM-files"
|
|
|
|
echo "Creating ${INTERNAL_NAME}.tar"
|
2002-08-07 22:12:36 +00:00
|
|
|
cd ${INSTALL_DIR}${PREFIX}
|
2002-08-21 19:52:04 +00:00
|
|
|
if ${TAR} cvf ${INSTALL_DIR}/${INTERNAL_NAME}.tar ${INSTALL_SUBDIRS} \
|
|
|
|
> ${LOG_DIR}/${INTERNAL_NAME}.log 2>&1 ; then : ; else
|
|
|
|
echo "Error, see ${LOG_DIR}/${INTERNAL_NAME}.log"
|
2002-08-07 22:12:36 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Writing README"
|
|
|
|
cd ${INSTALL_DIR}
|
|
|
|
${CAT} >> README <<EOF
|
|
|
|
CMake $VERSION binary for $PLATFORM
|
|
|
|
|
2002-09-23 21:20:34 +00:00
|
|
|
Extract the file "${INTERNAL_NAME}.tar" into your destination
|
|
|
|
directory (typically /usr/local). The following files will be
|
|
|
|
extracted:
|
2002-08-07 22:12:36 +00:00
|
|
|
|
|
|
|
${FILES}
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar"
|
|
|
|
echo "Creating CMake$VERSION-$PLATFORM.tar"
|
2002-08-21 19:52:04 +00:00
|
|
|
if ${TAR} cvf $TARBALL README ${INTERNAL_NAME}.tar \
|
2002-08-07 22:12:36 +00:00
|
|
|
> ${LOG_DIR}/CMake$VERSION-$PLATFORM.log 2>&1 ; then : ; else
|
|
|
|
"Error, see ${LOG_DIR}/CMake$VERSION-$PLATFORM.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
|