forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliphysics.sh
63 lines (60 loc) · 2.51 KB
/
aliphysics.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package: AliPhysics
version: "%(commit_hash)s%(defaults_upper)s"
requires:
- AliRoot
source: http://git.cern.ch/pub/AliPhysics
write_repo: https://git.cern.ch/reps/AliPhysics
tag: master
env:
ALICE_PHYSICS: "$ALIPHYSICS_ROOT"
incremental_recipe: |
make ${JOBS:+-j$JOBS} install
ctest -R load_library --output-on-failure ${JOBS:+-j $JOBS}
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles
---
#!/bin/bash -e
# Picking up ROOT from the system when our is disabled
if [ "X$ROOT_ROOT" = X ]; then
ROOT_ROOT="$(root-config --prefix)"
fi
cmake "$SOURCEDIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
-DROOTSYS="$ROOT_ROOT" \
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE"} \
${ALIEN_RUNTIME_ROOT:+-DALIEN="$ALIEN_RUNTIME_ROOT"} \
${FASTJET_ROOT:+-DFASTJET="$FASTJET_ROOT"} \
${CGAL_ROOT:+-DCGAL="$CGAL_ROOT"} \
${MPFR_ROOT:+-DMPFR="$MPFR_ROOT"} \
${GMP_ROOT:+-DGMP="$GMP_ROOT"} \
-DALIROOT="$ALIROOT_ROOT"
if [[ $GIT_TAG == master ]]; then
make -k ${JOBS+-j $JOBS} install || true
ctest -R load_library --output-on-failure ${JOBS:+-j $JOBS} || true
else
make ${JOBS+-j $JOBS} install
if [[ $(ctest -N -R load_library | grep -i "total tests:" | cut -d: -f2) -gt 0 ]]; then
# Run library loading test if we have them
ctest -R load_library --output-on-failure ${JOBS:+-j $JOBS}
fi
fi
# Modulefile
mkdir -p etc/modulefiles
cat > etc/modulefiles/$PKGNAME <<EoF
#%Module1.0
proc ModulesHelp { } {
global version
puts stderr "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
}
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0 AliRoot/$ALIROOT_VERSION-$ALIROOT_REVISION
# Our environment
setenv ALIPHYSICS_VERSION \$version
setenv ALIPHYSICS_RELEASE \$::env(ALIPHYSICS_VERSION)
setenv ALICE_PHYSICS \$::env(BASEDIR)/$PKGNAME/\$::env(ALIPHYSICS_RELEASE)
prepend-path PATH \$::env(ALICE_PHYSICS)/bin
prepend-path LD_LIBRARY_PATH \$::env(ALICE_PHYSICS)/lib
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(ALICE_PHYSICS)/lib")
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles