Skip to content

Commit

Permalink
Fixing EPOS recipe and basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Berzano committed Nov 16, 2015
1 parent aa3c355 commit 7547f8c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
13 changes: 13 additions & 0 deletions epos-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package: EPOS-test
version: v1
force_rebuild: 1
requires:
- EPOS
---
#!/bin/bash -ex
export OPT=$PWD
export CHK=$PWD
cp "$EPO"/test/bp5nohnoc10n10f.optns .
cp "$EPO"/test/iclbp.optns .
epos bp5nohnoc10n10f
[ -f z-bp5nohnoc10n10f.root ]
29 changes: 16 additions & 13 deletions epos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ source: https://gitlab.cern.ch/ALICEPrivateExternals/epos.git
requires:
- ROOT
- fastjet
env:
EPOVSN: "${EPOS_VERSION/./}"
EPO: "${EPOS_ROOT}/epos/"
---
#!/bin/bash -ex

export EPOVSN=${PKGVERSION/./}

# Please note that EPOS *requires* the EPO variable to have a trailing slash!
# It will not compile otherwise!
# The following two variables *must* have a trailing slash! EPOS installation
# will make a mess otherwise.
export EPO=$PWD/
export OBJ=$EPO/Unu/Lib
export OBJ=$EPO/Unu/Lib/

rsync -a --exclude='**/.git' --delete ${SOURCEDIR}/ .
mkdir $OBJ
Expand All @@ -23,22 +26,22 @@ export LIBRARY_PATH="$LD_LIBRARY_PATH"
make ${JOBS:+-j$JOBS} LFLAGS="$LDFLAGS"

# "Install"
mkdir -p $INSTALLROOT/share/epos \
INST_SUBROOT=$INSTALLROOT/epos
mkdir -p $INST_SUBROOT \
$INSTALLROOT/bin
rsync -a \
--exclude=.git \
--exclude='**/bin' \
--exclude='**/.git' \
--exclude=*.f \
--exclude=*.o \
--exclude=*.h \
--exclude=*.c \
--exclude=*.cpp \
--exclude=Makefile \
--exclude=*.md \
--exclude=epos-wrap \
./ $INSTALLROOT/share/epos/
cp epos-wrap $INSTALLROOT/bin
chmod a=rx $INSTALLROOT/bin/epos-wrap
find $INSTALLROOT -type d -empty -exec rmdir '{}' \; || true
./ $INST_SUBROOT/
rsync -a bin/ $INSTALLROOT/bin/
find $INSTALLROOT -type d -empty -exec rmdir '{}' \; > /dev/null 2>&1 || true
[ -d "$INST_SUBROOT/Unu/Lib/epos$EPOVSN" ]

# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
Expand All @@ -58,6 +61,6 @@ module load BASE/1.0 ROOT/$ROOT_VERSION-$ROOT_REVISION fastjet/$FASTJET_VERSION-
setenv EPOS_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH $::env(EPOS_ROOT)/bin
setenv EPOVSN ${EPOVSN}
# Final slash is required by EPOS, please leave it there
setenv EPO $::env(EPOS_ROOT)/share/epos/
# Final slash is required by EPOS, please leave it be
setenv EPO $::env(EPOS_ROOT)/epos/
EoF

0 comments on commit 7547f8c

Please sign in to comment.