Skip to content

Commit

Permalink
TRIQs 3.0.x (the current latest commit of the branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Oct 15, 2024
1 parent 9c077d7 commit ba70585
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 17 deletions.
11 changes: 9 additions & 2 deletions apps/triqs/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ SCRIPT_DIR=$(cd "$(dirname $0)"; pwd)
. $SCRIPT_DIR/version.sh
set_prefix

FILE="triqs-${__VERSION__}.tar.gz"
if [ "_${USE_RELEASED}" = "_ON" ]; then
URL=https://github.com/TRIQS/triqs/archive/${__VERSION__}.tar.gz
FILE="${__NAME__}-${__VERSION__}.tar.gz"
else
URL=https://github.com/TRIQS/triqs/archive/${TRIQS_SHA}.zip
FILE=${__NAME__}-${__VERSION__}.zip
fi

if [ -f $SOURCE_DIR/$FILE ]; then :; else
check wget -O $SOURCE_DIR/$FILE $WGET_OPTION https://github.com/TRIQS/triqs/archive/${__VERSION__}.tar.gz
check wget -O $SOURCE_DIR/$FILE $WGET_OPTION $URL
fi
21 changes: 15 additions & 6 deletions apps/triqs/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ sh ${SCRIPT_DIR}/download.sh
NV=${__NAME__}-${__VERSION__}
cd $BUILD_DIR
if [ -d $NV ]; then :; else
check mkdir -p $NV
tarfile=$SOURCE_DIR/${NV}.tar.gz
echo $PWD
echo $tarfile
sc=`calc_strip_components $tarfile $ROOT_FILE`
check tar zxf $tarfile -C $NV --strip-components=$sc
if [ "_${USE_RELEASED}" = "_ON" ]; then
check mkdir -p $NV
tarfile=$SOURCE_DIR/${NV}.tar.gz
echo $PWD
echo $tarfile
sc=`calc_strip_components $tarfile $ROOT_FILE`
check tar zxf $tarfile -C $NV --strip-components=$sc
else
zipfile=$SOURCE_DIR/${NV}.zip
echo $PWD
echo $zipfile
check unzip $zipfile
mv ${__NAME__}-${TRIQS_SHA} ${NV}
fi

cd $NV
if [ -f $SCRIPT_DIR/patch/${NV}.patch ]; then
patch -p1 < $SCRIPT_DIR/patch/${NV}.patch
Expand Down
11 changes: 10 additions & 1 deletion apps/triqs/version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
TRIQS_VERSION="3.0.0"
# USE_RELEASED=ON
USE_RELEASED=OFF

if [ "_${USE_RELEASED}" = "_ON" ]; then
TRIQS_VERSION="3.0.0"
else
TRIQS_SHA="5aa3e1af6b6a580e486c40e64b37dfbfb62118fe"
TRIQS_VERSION=$(echo ${TRIQS_SHA} | cut -c 1-8)
fi

TRIQS_MA_REVISION=0

__NAME__=triqs
Expand Down
10 changes: 10 additions & 0 deletions apps/triqs_dfttools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export UTIL_SH=$SCRIPT_DIR/../../scripts/util.sh
set_prefix

. ${MA_ROOT}/env.sh

if [ -n "${TRIQS_VARS_FILE}" ]; then
if [ -f ${MA_ROOT}/triqs/${TRIQS_VARS_FILE} ]; then
. ${MA_ROOT}/triqs/${TRIQS_VARS_FILE}
else
echo "Error: ${MA_ROOT}/triqs/${TRIQS_VARS_FILE} not found"
exit 127
fi
fi

export PREFIX="${MA_ROOT}/${__NAME__}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}"
if [ -d $PREFIX ]; then
echo "Error: $PREFIX exists"
Expand Down
11 changes: 7 additions & 4 deletions apps/triqs_dfttools/version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
TRIQS_VERSION="3.0.0"
TRIQS_MA_REVISION=0
TRIQS_DFTTOOLS_VERSION="3.0.0"
TRIQS_DFTTOOLS_MA_REVISION=0

# if you want to use the specific triqsvars file, please uncomment the following line and set filename properly
TRIQS_VARS_FILE=triqsvars-5aa3e1af-0.sh

__NAME__=triqs_dfttools
__VERSION__=${TRIQS_VERSION}
__MA_REVISION__=${TRIQS_MA_REVISION}
__VERSION__=${TRIQS_DFTTOOLS_VERSION}
__MA_REVISION__=${TRIQS_DFTTOOLS_MA_REVISION}
10 changes: 10 additions & 0 deletions apps/triqs_hubbardI/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export UTIL_SH=$SCRIPT_DIR/../../scripts/util.sh
set_prefix

. ${MA_ROOT}/env.sh

if [ -n "${TRIQS_VARS_FILE}" ]; then
if [ -f ${MA_ROOT}/triqs/${TRIQS_VARS_FILE} ]; then
. ${MA_ROOT}/triqs/${TRIQS_VARS_FILE}
else
echo "Error: ${MA_ROOT}/triqs/${TRIQS_VARS_FILE} not found"
exit 127
fi
fi

export PREFIX="${MA_ROOT}/${__NAME__}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}"
if [ -d $PREFIX ]; then
echo "Error: $PREFIX exists"
Expand Down
11 changes: 7 additions & 4 deletions apps/triqs_hubbardI/version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
TRIQS_VERSION="3.0.0"
TRIQS_MA_REVISION=0
TRIQS_HUBBARDI_VERSION="3.0.0"
TRIQS_HUBBARDI_MA_REVISION=0

# if you want to use the specific triqsvars file, please uncomment the following line and set filename properly
TRIQS_VARS_FILE=triqsvars-5aa3e1af-0.sh

__NAME__=triqs_hubbardI
__VERSION__=${TRIQS_VERSION}
__MA_REVISION__=${TRIQS_MA_REVISION}
__VERSION__=${TRIQS_HUBBARDI_VERSION}
__MA_REVISION__=${TRIQS_HUBBARDI_MA_REVISION}

0 comments on commit ba70585

Please sign in to comment.