build_opennebula.sh
1 |
#!/bin/bash -ex |
---|---|
2 |
|
3 |
BUILD_DIR=$PWD |
4 |
|
5 |
if [ -f "xmlrpc-c.tar.gz" ]; then |
6 |
( |
7 |
tar xzvf xmlrpc-c.tar.gz |
8 |
mv xmlrpc-c .. |
9 |
) |
10 |
fi |
11 |
|
12 |
# Compile xmlrpc-c |
13 |
cd ../xmlrpc-c |
14 |
export CXXFLAGS="-fPIC" |
15 |
export CFLAGS="-Wno-error=format-security" |
16 |
./configure --prefix=$PWD/install |
17 |
make |
18 |
make install |
19 |
|
20 |
# Delete dynamic libraries |
21 |
rm -f install/{lib,lib64}/*.so install/{lib,lib64}/*.so.* |
22 |
|
23 |
# Add xmlrpc-c libraries bin dir to the path |
24 |
export PATH=$PWD/install/bin:$PATH |
25 |
|
26 |
# Compile OpenNebula |
27 |
cd $BUILD_DIR |
28 |
|
29 |
scons -j2 mysql=yes xmlrpc=$BUILD_DIR/../xmlrpc-c/install new_xmlrpc=yes $@ # syslog=yes |