default UNPACK_PATH=${PREFIX_PATH}/${PROJECT}-unpack
default BUILD_PATH=${PREFIX_PATH}/${PROJECT}-build
default INSTALL_PATH=${PREFIX_PATH}/${PROJECT}
+default CONFIGURATION_PATH=${PREFIX_PATH}/${PROJECT}/share/configuration
default CLEAN_BUILD=false
default STABLE_BUILD=true
echo
echo "-------------------------------------------------------------------------------"
-cecho ${INFO} "Downloading files to: $(prettify_dir ${DOWNLOAD_PATH})"
-cecho ${INFO} "Unpacking files to: $(prettify_dir ${UNPACK_PATH})"
-cecho ${INFO} "Building packages in: $(prettify_dir ${BUILD_PATH})"
-cecho ${GOOD} "Installing packages in: $(prettify_dir ${INSTALL_PATH})"
+cecho ${INFO} "Downloading files to: $(prettify_dir ${DOWNLOAD_PATH})"
+cecho ${INFO} "Unpacking files to: $(prettify_dir ${UNPACK_PATH})"
+cecho ${INFO} "Building packages in: $(prettify_dir ${BUILD_PATH})"
+cecho ${GOOD} "Installing packages in: $(prettify_dir ${INSTALL_PATH})"
+cecho ${GOOD} "Package configuration in: $(prettify_dir ${CONFIGURATION_PATH})"
echo
echo "-------------------------------------------------------------------------------"
mkdir -p ${UNPACK_PATH}
mkdir -p ${BUILD_PATH}
mkdir -p ${INSTALL_PATH}
+mkdir -p ${CONFIGURATION_PATH}
ORIG_INSTALL_PATH=${INSTALL_PATH}
+ORIG_CONFIGURATION_PATH=${CONFIGURATION_PATH}
ORIG_PROCS=${PROCS}
guess_architecture
TARGETS=('' install)
PROCS=${ORIG_PROCS}
INSTALL_PATH=${ORIG_INSTALL_PATH}
+ CONFIGURATION_PATH=${ORIG_CONFIGURATION_PATH}
# Reset package-specific functions
package_specific_setup () { true; }
export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib
export BOOST_USE_MULTITHREADED=OFF
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export BOOST_ROOT=${INSTALL_PATH}
+export BOOST_INCLUDEDIR=${INSTALL_PATH}/include
+export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib
+export BOOST_USE_MULTITHREADED=OFF
+" >> $CONFIG_FILE
+}
export BZIP2_INCLUDE=${INSTALL_PATH}/include
export BZIP2_LIBPATH=${INSTALL_PATH}/lib
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export BZIP2_INCLUDE=${INSTALL_PATH}/include
+export BZIP2_LIBPATH=${INSTALL_PATH}/lib
+" >> $CONFIG_FILE
+}
package_specific_register () {
export PATH=${INSTALL_PATH}/${EXTRACTSTO}/bin:${PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export PATH=${INSTALL_PATH}/${EXTRACTSTO}/bin:\${PATH}
+" >> $CONFIG_FILE
+}
fi
################################################################################
-################################################################################
-# **********************************************************************************
+
package_specific_conf() {
+ ############################################################################
+ # Generate modulefile
# Prepare modulefile path and config file name
if [ -z "${COMPILER}" ]; then
MODULEFILE_PATH=${INSTALL_PATH}/share/modulefiles${MODULEFILE_PATH}
fi
-if [ -z "${CONFIG_FILE}" ]; then
- CONFIG_FILE=${MODULEFILE_PATH}/${COMPILER}
-fi
+CONFIG_FILE=${MODULEFILE_PATH}/${COMPILER}
CURRENT_MODULES=$(echo ${LOADEDMODULES} | sed 's/:/\ /g')
echo
export DEAL_II_DIR=${INSTALL_PATH}
+
+ ############################################################################
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export DEAL_II_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
}
+
+
package_specific_register () {
export HDF5_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export HDF5_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export OPENCASCADE_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export OPENCASCADE_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export P4EST_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export P4EST_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export METIS_DIR=${INSTALL_PATH}
+export PARMETIS_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export PETSC_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export PETSC_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export SLEPC_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export SLEPC_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export SUPERLU_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export SUPERLU_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
package_specific_register () {
export TRILINOS_DIR=${INSTALL_PATH}
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export TRILINOS_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
export ZLIB_INCLUDE=${INSTALL_PATH}/include
export ZLIB_LIBPATH=${INSTALL_PATH}/lib
}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
+ rm -f $CONFIG_FILE
+ echo "
+export ZLIB_DIR=${INSTALL_PATH}/
+export ZLIB_INCLUDE=${INSTALL_PATH}/include
+export ZLIB_LIBPATH=${INSTALL_PATH}/lib
+" >> $CONFIG_FILE
+}
# Where do you want the compiled software installed?
INSTALL_PATH=${PREFIX_PATH}/${PROJECT}
+# Where do you want the configuration files placed?
+CONFIGURATION_PATH=${PREFIX_PATH}/${PROJECT}/share/configuration
+
#########################################################################
# Set up mirror server url(s), to speed up downloads, e.g.
# MIRROR="${MIRROR} http://server1.org/package_mirror_dir/"