forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aegis.sh
42 lines (41 loc) · 1.22 KB
/
aegis.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
package: AEGIS
version: "%(tag_basename)s"
tag: v1.1
requires:
- ROOT
- pythia6
build_requires:
- CMake
- hijing
- "Xcode:(osx.*)"
source: https://github.com/AliceO2Group/AEGIS.git
prepend_path:
LD_LIBRARY_PATH: "$AEGIS_ROOT/lib"
ROOT_INCLUDE_PATH: "$AEGIS_ROOT/include"
---
#!/bin/bash -e
cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DCMAKE_SKIP_RPATH=TRUE
cmake --build . -- ${JOBS:+-j$JOBS} install
# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
cat > "$MODULEFILE" <<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 ROOT/$ROOT_VERSION-$ROOT_REVISION
# Our environment
set AEGIS_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv AEGIS_ROOT \$AEGIS_ROOT
prepend-path LD_LIBRARY_PATH \$AEGIS_ROOT/lib
prepend-path ROOT_INCLUDE_PATH \$AEGIS_ROOT/include
EoF