3 # Get Command Line arguements if present
5 if [ "x$1" != "x" ]; then
8 VPP_DIR=`dirname $0`/../../
11 if [ "x$2" != "x" ]; then
12 SUDOCMD="sudo -H -u $2"
17 echo VPP_DIR: $VPP_DIR
18 echo SUDOCMD: $SUDOCMD
20 if [ "$(uname)" <> "Darwin" ]; then
21 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
22 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
26 KERNEL_MACHINE=`uname -m`
27 KERNEL_RELEASE=`uname -r`
28 KERNEL_VERSION=`uname -v`
30 echo KERNEL_OS: $KERNEL_OS
31 echo KERNEL_MACHINE: $KERNEL_MACHINE
32 echo KERNEL_RELEASE: $KERNEL_RELEASE
33 echo KERNEL_VERSION: $KERNEL_VERSION
35 echo OS_VERSION_ID: $OS_ID
37 # Install dependencies
39 make UNATTENDED=yes install-dep
41 # Really really clean things up so we can be sure
42 # that the build works even when switching distros
44 (cd build-root/;$SUDOCMD make distclean)
45 rm -f build-root/.bootstrap.ok
47 if [ $OS_ID == "centos" ]; then
50 if [ $? != 0 ]; then sudo yum reinstall -y apr-devel;fi
51 echo rpm -V ganglia-devel
53 if [ $? != 0 ]; then sudo yum reinstall -y ganglia-devel;fi
54 echo rpm -V libconfuse-devel
55 rpm -V libconfuse-devel
56 if [ $? != 0 ]; then sudo yum reinstall -y libconfuse-devel;fi
59 # Build and install packaging
60 $SUDOCMD make bootstrap
62 if [ "$OS_ID" == "ubuntu" ]; then
64 elif [ "$OS_ID" == "debian" ]; then
66 elif [ "$OS_ID" == "centos" ]; then
67 (cd $VPP_DIR/vnet ;$SUDOCMD aclocal;$SUDOCMD automake -a)
69 elif [ "$OS_ID" == "opensuse" ]; then
70 $SUDOCMD make build-release