Merge "Auto Update CSIT Jobs to run for oxygen"
[releng/builder.git] / jjb / opflex / deps-inc-v2 / openvswitch_tgz-build.sh
1 #!/bin/bash
2 # Build script for openvswitch
3
4 set -e
5 set -x
6
7 ROOT=/tmp/opflex-prefix
8 DESTDIR=install-root
9
10 mkdir -p "$DESTDIR"
11
12 ./boot.sh
13 ./configure --prefix="$ROOT" --enable-shared
14 make -j4
15 DESTDIR=`pwd`/$DESTDIR make install
16
17 # OVS headers get installed to weird and inconsistent locations.  Try
18 # to clean things up
19 mkdir -p $DESTDIR/$ROOT/include/openvswitch/openvswitch
20 mv $DESTDIR/$ROOT/include/openvswitch/*.h $DESTDIR/$ROOT/include/openvswitch/openvswitch
21 mv $DESTDIR/$ROOT/include/openflow $DESTDIR/$ROOT/include/openvswitch
22 cp -t "$DESTDIR/$ROOT/include/openvswitch/" include/*.h
23 find lib -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
24
25 pushd $DESTDIR
26 tar -czf openvswitch.tgz *
27 popd
28