forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
control-core.sh
44 lines (41 loc) · 1.32 KB
/
control-core.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
package: Control-Core
version: "%(tag_basename)s"
tag: "v0.9.0"
build_requires:
- "GCC-Toolchain:(?!osx)"
- golang
- protobuf
- grpc
- InfoLogger
source: https://github.com/AliceO2Group/Control
---
#!/bin/bash -e
export GOPATH=$PWD/go
export PATH=$GOPATH/bin:$PATH
BUILD=$GOPATH/src/github.com/AliceO2Group/Control
mkdir -p $BUILD
rsync -a --delete $SOURCEDIR/ $BUILD/
pushd $BUILD
make WHAT="o2control-core o2control-executor" all
mkdir -p $INSTALLROOT/bin
rsync -a --delete bin/ $INSTALLROOT/bin
popd
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 \\
${PROTOBUF_VERSION:+protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION}
# Our environment
set CONTROL_CORE_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH \$CONTROL_CORE_ROOT/bin
prepend-path LD_LIBRARY_PATH \$CONTROL_CORE_ROOT/lib
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$CONTROL_CORE_ROOT/lib")
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles