Last active
February 15, 2016 11:00
-
-
Save janpipek/4d5881bc00d1fdbcd8f2 to your computer and use it in GitHub Desktop.
Installation of Geant4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# module load cmake/3.4.3 | |
export SW_NAME=geant4 | |
export PACKAGE_VERSION=10.02 | |
export PACKAGE_NAME=$SW_NAME.$PACKAGE_VERSION | |
export PACKAGE_DIR=$HOME/install/packages | |
export PACKAGE_FILE=$PACKAGE_DIR/$PACKAGE_NAME.tar.gz | |
export URL=http://geant4.cern.ch/support/source/$PACKAGE_NAME.tar.gz | |
export INSTALL_DIR=/opt/$PACKAGE_NAME | |
export MAKE_PROCESSES=4 # Change according to your wish :-) | |
if [ ! -d $PACKAGE_DIR ]; then | |
mkdir -p $PACKAGE_DIR | |
fi | |
cd $PACKAGE_DIR | |
if [ ! -f $PACKAGE_FILE ]; then | |
wget $URL | |
fi | |
export BUILD_DIR=`mktemp -d` | |
cd $BUILD_DIR | |
tar xzf $PACKAGE_FILE | |
mkdir build | |
cd build | |
cmake -DGEANT4_FORCE_QT4=ON -DGEANT4_USE_QT=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_INSTALL_DATA=ON ../$PACKAGE_NAME | |
make -j$MAKE_PROCESSES install && rm -rf $BUILD_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment