forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datadistribution.sh
64 lines (60 loc) · 2.16 KB
/
datadistribution.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
64
package: DataDistribution
version: "%(tag_basename)s"
tag: v1.5.3
requires:
- "GCC-Toolchain:(?!osx)"
- boost
- FairLogger
- libInfoLogger
- FairMQ
- Ppconsul
- grpc
- Monitoring
- protobuf
- O2
- fmt
- "ucx:(slc8)"
build_requires:
- CMake
source: https://github.com/AliceO2Group/DataDistribution
incremental_recipe: |
# reduce number of compile slots if invoked by Jenkins
if [ ! "X$JENKINS_HOME" = X ]; then
JOBS=4
fi
make ${JOBS:+-j$JOBS} install
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles
cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT}
---
#!/bin/bash -ex
case $ARCHITECTURE in
osx*)
[[ ! $BOOST_ROOT ]] && BOOST_ROOT=$(brew --prefix boost)
[[ ! $FMT_ROOT ]] && FMT_ROOT=$(brew --prefix fmt)
[[ ! $PROTOBUF_ROOT ]] && PROTOBUF_ROOT=$(brew --prefix protobuf)
;;
esac
cmake $SOURCEDIR \
${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} \
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
${BOOST_ROOT:+-DBoost_ROOT=$BOOST_ROOT} \
${FAIRLOGGER_ROOT:+-DFairLogger_ROOT=$FAIRLOGGER_ROOT} \
${INFOLOGGER_ROOT:+-DInfoLogger_ROOT=$INFOLOGGER_ROOT} \
${FAIRMQ_ROOT:+-DFairMQ_ROOT=$FAIRMQ_ROOT} \
${PPCONSUL_ROOT:+-Dppconsul_DIR=${PPCONSUL_ROOT}/cmake} \
${O2_ROOT:+-DO2_ROOT=$O2_ROOT} \
${MONITORING_ROOT:+-DMonitoring_ROOT=$MONITORING_ROOT} \
${PROTOBUF_ROOT:+-DProtobuf_ROOT=$PROTOBUF_ROOT} \
${UCX_ROOT:+-DUCX_DIR=${UCX_ROOT}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT}
# reduce number of compile slots if invoked by Jenkins
if [ ! "X$JENKINS_HOME" = X ]; then
JOBS=4
fi
cmake --build . -- ${JOBS+-j $JOBS} install
# Modulefile
mkdir -p etc/modulefiles
alibuild-generate-module --bin > etc/modulefiles/$PKGNAME
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles