Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19251135
rivet-bootstrap
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
rivet-bootstrap
View Options
#! /usr/bin/env bash
test
-z
"
$BUILD_PREFIX
"
&&
BUILD_PREFIX
=
"
$PWD
"
test
-z
"
$INSTALL_PREFIX
"
&&
INSTALL_PREFIX
=
"
$PWD
/local"
test
-z
"
$MAKE
"
&&
MAKE
=
"make -j3"
test
-z
"
$INSTALL_GSL
"
&&
INSTALL_GSL
=
"1"
test
-z
"
$INSTALL_BOOST
"
&&
INSTALL_BOOST
=
"1"
test
-z
"
$INSTALL_HEPMC
"
&&
INSTALL_HEPMC
=
"1"
test
-z
"
$INSTALL_FASTJET
"
&&
INSTALL_FASTJET
=
"1"
test
-z
"
$INSTALL_YODA
"
&&
INSTALL_YODA
=
"1"
test
-z
"
$INSTALL_RIVET
"
&&
INSTALL_RIVET
=
"1"
test
-z
"
$RIVET_VERSION
"
&&
RIVET_VERSION
=
"2.1.0"
test
-z
"
$YODA_VERSION
"
&&
YODA_VERSION
=
"1.0.4"
HEPMC_VERSION
=
"2.06.06"
# TODO: want 2.06.09
FASTJET_VERSION
=
"3.0.3"
# TODO: want 3.0.4
BOOST_VERSION
=
"1_55_0"
GSL_VERSION
=
"1.16"
## Paths for the case of existing installations
test
-z
"
$GSLPATH
"
&&
GSLPATH
=
"/usr"
test
-z
"
$BOOSTPATH
"
&&
BOOSTPATH
=
"/usr"
test
-z
"
$HEPMCPATH
"
&&
HEPMCPATH
=
"/usr"
test
-z
"
$FASTJETPATH
"
&&
FASTJETPATH
=
"/usr"
test
-z
"
$YODAPATH
"
&&
YODAPATH
=
"/usr"
test
-z
"
$RIVET_CONFFLAGS
"
&&
RIVET_CONFFLAGS
=
""
#--enable-unvalidated
test
-z
"
$YODA_CONFFLAGS
"
&&
YODA_CONFFLAGS
=
""
if
[[
"
$INSTALL_RIVETDEV
"
-eq
"1"
]]
;
then
## For rivetdev we skip the normal yoda/rivet installation
INSTALL_YODA
=
"0"
INSTALL_RIVET
=
"0"
## Might need to install some extra toolkit bits for dev mode
test
-z
"
$INSTALL_AUTOTOOLS
"
&&
INSTALL_AUTOTOOLS
=
"1"
test
-z
"
$INSTALL_CYTHON
"
&&
INSTALL_CYTHON
=
"1"
fi
###############
echo
"Running Rivet 2.x bootstrap script"
## Immediate exit on a command (group) failure and optional debug mode
set
-e
test
-n
"
$DEBUG
"
&&
set
-x
export
PATH
=
$INSTALL_PREFIX
/bin:
$PATH
function
wget_untar
{
wget
$1
-O-
|
tar xz
;
}
function
conf
{
./configure --prefix
=
$INSTALL_PREFIX
"
$@
"
;
}
function
mmi
{
$MAKE
"
$@
"
&&
$MAKE
install
;
}
## Install cmake
if
! which cmake > /dev/null
;
then
cd
$BUILD_PREFIX
wget_untar http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
cd
cmake-2.8.12.1
conf
mmi
fi
;
## Install Boost
if
[[
"
$INSTALL_BOOST
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget http://downloads.sourceforge.net/boost/boost_
$BOOST_VERSION
.tar.gz
tar xzf boost_
$BOOST_VERSION
.tar.gz boost_
$BOOST_VERSION
/boost
mkdir -p
$INSTALL_PREFIX
/include
rm -rf
$INSTALL_PREFIX
/include/boost
mv boost_
$BOOST_VERSION
/boost
$INSTALL_PREFIX
/include/
BOOSTPATH
=
$INSTALL_PREFIX
fi
## Install GSL
if
[[
"
$INSTALL_GSL
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget_untar http://ftpmirror.gnu.org/gsl/gsl-
$GSL_VERSION
.tar.gz
cd
gsl-
$GSL_VERSION
conf
mmi
GSLPATH
=
$INSTALL_PREFIX
fi
## Install HepMC
if
[[
"
$INSTALL_HEPMC
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
test
-d HepMC-
$HEPMC_VERSION
||
wget_untar http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-
$HEPMC_VERSION
.tar.gz
cd
HepMC-
$HEPMC_VERSION
conf --with-momentum
=
GEV --with-length
=
MM
mmi
HEPMCPATH
=
$INSTALL_PREFIX
fi
## Install FastJet
if
[[
"
$INSTALL_FASTJET
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget_untar http://www.fastjet.fr/repo/fastjet-
$FASTJET_VERSION
.tar.gz
cd
fastjet-
$FASTJET_VERSION
conf --enable-shared --enable-allcxxplugins
mmi
FASTJETPATH
=
$INSTALL_PREFIX
fi
## Install YODA
if
[[
"
$INSTALL_YODA
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget_untar http://www.hepforge.org/archive/yoda/YODA-
$YODA_VERSION
.tar.gz
cd
YODA-
$YODA_VERSION
conf
$YODA_CONFFLAGS
--with-boost
=
$BOOSTPATH
mmi
cp yodaenv.sh
$INSTALL_PREFIX
/yodaenv.sh
YODAPATH
=
$INSTALL_PREFIX
fi
## Install Rivet
if
[[
"
$INSTALL_RIVET
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget_untar http://www.hepforge.org/archive/rivet/Rivet-
$RIVET_VERSION
.tar.gz
cd
Rivet-
$RIVET_VERSION
conf
$RIVET_CONFFLAGS
\
--with-yoda
=
$YODAPATH
\
--with-hepmc
=
$HEPMCPATH
\
--with-fastjet
=
$FASTJETPATH
\
--with-boost
=
$BOOSTPATH
\
--with-gsl
=
$GSLPATH
mmi
cp rivetenv.sh rivetenv.csh
$INSTALL_PREFIX
/
fi
## Following block for dev mode only -- non-developers should ignore
if
[[
"
$INSTALL_RIVETDEV
"
-eq
"1"
]]
;
then
## Install autotools
if
[[
"
$INSTALL_AUTOTOOLS
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
function
_build_autotool
()
{
name
=
$1
-
$2
if
[
! -e
$name
]
;
then
wget_untar http://ftpmirror.gnu.org/
$1
/
$name
.tar.gz
;
fi
cd
$name
./configure --prefix
=
$INSTALL_PREFIX
mmi
cd
..
}
test
-e
$INSTALL_PREFIX
/bin/m4
||
{
echo
;
echo
"Building m4"
;
_build_autotool m4
1
.4.16
;
}
test
-e
$INSTALL_PREFIX
/bin/autoconf
||
{
echo
;
echo
"Building autoconf"
;
_build_autotool autoconf
2
.69
;
}
test
-e
$INSTALL_PREFIX
/bin/automake
||
{
echo
;
echo
"Building automake"
;
_build_autotool automake
1
.13.4
;
}
test
-e
$INSTALL_PREFIX
/bin/libtool
||
{
echo
;
echo
"Building libtool"
;
_build_autotool libtool
2
.4.2
;
}
fi
## Install hg
if
! which hg > /dev/null
;
then
cd
$BUILD_PREFIX
wget_untar http://mercurial.selenic.com/release/mercurial-2.8.2.tar.gz
cd
mercurial-2.8.2
$MAKE
PREFIX
=
$INSTALL_PREFIX
install-bin
fi
;
## Install Cython
if
[[
"
$INSTALL_CYTHON
"
-eq
"1"
]]
;
then
cd
$BUILD_PREFIX
wget_untar http://cython.org/release/Cython-0.19.1.tar.gz
export
PATH
=
$BUILD_PREFIX
/Cython-0.19.1/bin:
$PATH
export
PYTHONPATH
=
$BUILD_PREFIX
/Cython-0.19.1:
$PATH
fi
;
## Install dev YODA
cd
$BUILD_PREFIX
hg clone http://yoda.hepforge.org/hg/yoda
cd
yoda
autoreconf -i
conf
$YODA_CONFFLAGS
--with-boost
=
$BOOSTPATH
mmi
cp yodaenv.sh
$INSTALL_PREFIX
/yodaenv.sh
YODAPATH
=
$INSTALL_PREFIX
## Install dev Rivet
cd
$BUILD_PREFIX
hg clone -r release-2-0 http://rivet.hepforge.org/hg/rivet
cd
rivet
autoreconf -i
conf
$RIVET_CONFFLAGS
\
--with-yoda
=
$YODAPATH
\
--with-hepmc
=
$HEPMCPATH
\
--with-fastjet
=
$FASTJETPATH
\
--with-boost
=
$BOOSTPATH
\
--with-gsl
=
$GSLPATH
mmi
cp rivetenv.sh rivetenv.csh
$INSTALL_PREFIX
/
fi
## Announce the build success
echo
;
echo
"All done. Now set some variables in your shell by sourcing
$INSTALL_PREFIX
/rivetenv.(c)sh"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Tue, Sep 30, 5:47 AM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6566370
Default Alt Text
rivet-bootstrap (5 KB)
Attached To
Mode
rRIVETBOOTSTRAPHG rivetbootstraphg
Attached
Detach File
Event Timeline
Log In to Comment