Skip to content
Snippets Groups Projects
Commit 5c517539 authored by Brad King's avatar Brad King
Browse files

ENH: Split install script into two parts. Added basic support for adding more...

ENH: Split install script into two parts.  Added basic support for adding more files to the distribution and creating packages.
parent 86709a4c
No related branches found
No related tags found
No related merge requests found
RELEASE_TAG="Release-1-4"
VERSION="1.4"
PLATFORM="hpux-static"
CMAKE="/home/hoffman/CMake-aCC/Source/cmake"
CC="cc"
CXX="aCC"
CMAKE_CACHE_ENTRIES="
# Write entries into the cache file before building cmake.
WriteCMakeCache()
{
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
CMAKE_CXX_SHLIB_LINK_FLAGS:STRING=-Wl,-a,archive
CMAKE_CXX_SHLIB_BUILD_FLAGS:STRING=
CMAKE_CXX_SHLIB_RUNTIME_FLAG:STRING=
"
EOF
}
RELEASE_TAG="Release-1-4"
VERSION="1.4"
PLATFORM="irix65"
CMAKE="/rolle/insight/CMake-CC-dashboard/Source/cmake"
CC="cc"
CXX="CC"
......@@ -5,11 +5,15 @@ CREATE_SOURCE_TARBALL="yes"
CURSES_LIBRARY="/usr/lib/libcurses.a"
FORM_LIBRARY="/usr/lib/libform.a"
CMAKE_CACHE_ENTRIES="
# Write entries into the cache file before building cmake.
WriteCMakeCache()
{
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
CMAKE_CXX_SHLIB_LINK_FLAGS:STRING=-static
CMAKE_CXX_SHLIB_BUILD_FLAGS:STRING=
CMAKE_CXX_SHLIB_RUNTIME_FLAG:STRING=
CURSES_LIBRARY:FILEPATH=${CURSES_LIBRARY}
FORM_LIBRARY:FILEPATH=${FORM_LIBRARY}
"
EOF
}
RELEASE_TAG="Release-1-4"
VERSION="1.4"
PLATFORM="sparc-sunos57-static"
CMAKE="/space/berk/CMake-build/Source/cmake"
CURSES_LIBRARY="/usr/lib/libcurses.a"
FORM_LIBRARY="/usr/lib/libform.a"
CMAKE_CACHE_ENTRIES="
# Write entries into the cache file before building cmake.
WriteCMakeCache()
{
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
CMAKE_CXX_SHLIB_LINK_FLAGS:STRING=-static
CMAKE_CXX_SHLIB_BUILD_FLAGS:STRING=
CMAKE_CXX_SHLIB_RUNTIME_FLAG:STRING=
CURSES_LIBRARY:FILEPATH=${CURSES_LIBRARY}
FORM_LIBRARY:FILEPATH=${FORM_LIBRARY}
"
EOF
}
......@@ -6,61 +6,17 @@
# have an entry for the CVSROOT used below.
#
# Check the command line arguments.
CONFIG_FILE=$1
if test "x$1" = "x"; then
echo "Usage:"
echo " $0 <configuration-file>"
echo ""
echo "Sample configuration file:"
echo " RELEASE_TAG=\"Release-1-4\""
echo " VERSION=\"1.4\""
echo " PLATFORM=\"x86-linux\""
exit 1
fi
# Set some defaults here. They can be changed by the configuration
# file.
CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
RELEASE_ROOT=`pwd`
CREATE_SOURCE_TARBALL="no"
CMAKE="cmake"
GZIP="gzip"
COMPRESS="compress"
TAR="tar"
CAT="cat"
MAKE="make"
FIND="find"
CVS="cvs"
CC="gcc"
CXX="c++"
CFLAGS=""
CXXFLAGS=""
CMAKE_CACHE_ENTRIES=""
#-----------------------------------------------------------------------------
# Configuration options (could be in separate file)
echo "Reading configuration from ${CONFIG_FILE}..."
if . `pwd`/${CONFIG_FILE} ; then : ; else
echo "Error reading configuration."
exit 1
fi
#-----------------------------------------------------------------------------
export CC CXX CFLAGS CXXFLAGS
# Find our own script's location.
SELFPATH=`cd \`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
# Select directories.
INSTALL_DIR="${RELEASE_ROOT}/Install"
TARBALL_DIR="${RELEASE_ROOT}/Tarballs"
BUILD_DIR="${RELEASE_ROOT}/CMake-$VERSION-$PLATFORM-build"
LOG_DIR="${RELEASE_ROOT}/Logs"
# Read the configuration.
. ${SELFPATH}/cmake_release_unix_config.sh
# Cleanup from possible previous run.
rm -rf ${LOG_DIR} ${BUILD_DIR} ${INSTALL_DIR} ${TARBALL_DIR}
mkdir -p ${LOG_DIR} ${BUILD_DIR} ${INSTALL_DIR} ${TARBALL_DIR}
# Make sure the source is exported from CVS.
SOURCE_DIR="${RELEASE_ROOT}/CMake-$VERSION"
if test ! -d ${SOURCE_DIR} ; then
cd ${RELEASE_ROOT}
rm -rf CMake
......@@ -95,15 +51,11 @@ fi
# Build the release.
cd ${BUILD_DIR}
echo "Writing CMakeCache.txt..."
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}
${CMAKE_CACHE_ENTRIES}
EOF
WriteCMakeCache
echo "Running CMake..."
if ${CMAKE} ${SOURCE_DIR} > ${LOG_DIR}/cmake.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/cmake.log"
echo "Running configure..."
if ${SOURCE_DIR}/configure --prefix=${PREFIX} > ${LOG_DIR}/configure.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/configure.log"
exit 1
fi
......@@ -112,49 +64,3 @@ if ${MAKE} > ${LOG_DIR}/make.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/make.log"
exit 1
fi
echo "Running make install..."
if ${MAKE} install > ${LOG_DIR}/make_install.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/make_install.log"
exit 1
fi
# Create the release tarballs.
cd ${INSTALL_DIR}
echo "Creating cmake-$VERSION-$PLATFORM.tar"
if ${TAR} cvf cmake-$VERSION-$PLATFORM.tar bin share \
> ${LOG_DIR}/cmake-$VERSION-$PLATFORM.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/cmake-$VERSION-$PLATFORM.log"
exit 1
fi
echo "Writing README"
FILES=`${FIND} bin share -type f |sed 's/^\.\///'`
${CAT} >> README <<EOF
CMake $VERSION binary for $PLATFORM
Extract the file "cmake-$VERSION-$PLATFORM.tar" into your
destination directory. The following files will be extracted:
${FILES}
EOF
TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar"
echo "Creating CMake$VERSION-$PLATFORM.tar"
if ${TAR} cvf $TARBALL README cmake-$VERSION-$PLATFORM.tar \
> ${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
#!/bin/sh
#
# CMake UNIX Release Configuration Script.
#
# This is sourced by the cmake_release_unix_build and
# cmake_release_unix_package to setup the configuration.
#
# Check the command line arguments.
CONFIG_FILE=$1
if test "x$1" = "x"; then
echo "Usage:"
echo " $0 <configuration-file>"
echo ""
echo "Sample configuration file:"
echo " RELEASE_TAG=\"Release-1-4\""
echo " VERSION=\"1.4\""
echo " PLATFORM=\"x86-linux\""
exit 1
fi
# Set some defaults here. They can be changed by the configuration
# file.
CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
CAT="cat"
COMPRESS="compress"
CREATE_SOURCE_TARBALL="no"
CVS="cvs"
FIND="find"
GZIP="gzip"
MAKE="make"
MKDIR="mkdir"
RELEASE_ROOT=`pwd`
STRIP="strip"
TAR="tar"
TOUCH="touch"
CC="gcc"
CXX="c++"
CFLAGS=""
CXXFLAGS=""
PREFIX="/usr/local"
INSTALL_SUBDIRS="bin share doc"
# Functions can be replaced by configuration file.
# Create extra files in the installation tree. This allows
# configurations to add documentation.
CreateExtraFiles()
{
return 0
}
# Create a package file. This allows configurations to create
# packages for certain UNIX distributions.
CreatePackage()
{
return 0
}
# Write entries into the cache file before building cmake.
WriteCMakeCache()
{
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
EOF
}
#-----------------------------------------------------------------------------
# Configuration options.
echo "Reading configuration from ${CONFIG_FILE}..."
if . ${CONFIG_FILE} ; then : ; else
echo "Error reading configuration."
exit 1
fi
#-----------------------------------------------------------------------------
export CC CXX CFLAGS CXXFLAGS
# Select directories.
INSTALL_DIR="${RELEASE_ROOT}/Install"
TARBALL_DIR="${RELEASE_ROOT}/Tarballs"
SOURCE_DIR="${RELEASE_ROOT}/CMake-$VERSION"
BUILD_DIR="${RELEASE_ROOT}/CMake-$VERSION-$PLATFORM-build"
LOG_DIR="${RELEASE_ROOT}/Logs"
INSTALL_OPTIONS="DESTDIR=\"${INSTALL_DIR}\""
#!/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.
rm -rf ${INSTALL_DIR} ${TARBALL_DIR}
mkdir -p ${INSTALL_DIR} ${TARBALL_DIR}
# 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
# Let the configuration file add some files.
CreateExtraFiles
# Create the manifest file.
echo "Writing MANIFEST..."
${MKDIR} -p ${INSTALL_DIR}${PREFIX}/doc/cmake
${TOUCH} ${INSTALL_DIR}${PREFIX}/doc/cmake/MANIFEST
cd ${INSTALL_DIR}${PREFIX}
FILES=`${FIND} ${INSTALL_SUBDIRS} -type f |sed 's/^\.\///'`
${CAT} >> ${INSTALL_DIR}${PREFIX}/doc/cmake/MANIFEST <<EOF
${FILES}
EOF
# Allow the configuration to create package files if it wants to do so.
CreatePackage
# Create the release tarballs.
echo "Creating cmake-$VERSION-$PLATFORM.tar"
cd ${INSTALL_DIR}${PREFIX}
if ${TAR} cvf ${INSTALL_DIR}/cmake-$VERSION-$PLATFORM.tar ${INSTALL_SUBDIRS} \
> ${LOG_DIR}/cmake-$VERSION-$PLATFORM.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/cmake-$VERSION-$PLATFORM.log"
exit 1
fi
echo "Writing README"
cd ${INSTALL_DIR}
${CAT} >> README <<EOF
CMake $VERSION binary for $PLATFORM
Extract the file "cmake-$VERSION-$PLATFORM.tar" into your
destination directory. The following files will be extracted:
${FILES}
EOF
TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar"
echo "Creating CMake$VERSION-$PLATFORM.tar"
if ${TAR} cvf $TARBALL README cmake-$VERSION-$PLATFORM.tar \
> ${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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment