summaryrefslogtreecommitdiff
path: root/ovs_build/build-ovs-nsh-dpdk.sh
blob: f80d081e76eb7f00c0e1fd9bb62b4861a1157cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash

set -eux

OVS_COMMIT=f4b0e64cffb4777ff03d48621c3eadcf1d8c19f3
URL_OVS=https://github.com/openvswitch/ovs.git
OVS_VER=${OVS_VER:-2.6.1}
BUILD_HOME=$HOME/nsh
BUILD_DEST=${BUILD_DEST:-/deb}
DIR="$(dirname `readlink -f $0`)"

export DEB_BUILD_OPTIONS='parallel=8 nocheck'

sudo apt-get -y install devscripts dpkg-dev git wget

rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}

cd ${BUILD_HOME}

# copy from debian/control
sudo apt-get install -y \
               graphviz \
               autoconf \
               automake \
               bzip2 \
               debhelper \
               dh-autoreconf \
               libssl-dev \
               libtool \
               openssl \
               procps \
               python-all \
               python-twisted-conch \
               python-zopeinterface \
               python-six

git clone https://github.com/openvswitch/ovs.git
cd ovs; git checkout ${OVS_COMMIT}
PATCHES=$(cd ${DIR}/ovs_nsh_patches/v2.6.1/; echo *patch)
for patch in ${PATCHES}
do
    patch -p1 < ${DIR}/ovs_nsh_patches/v2.6.1/${patch}
done

# build ovs
cd ${BUILD_HOME}/ovs
cat << EOF > debian/changelog
openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
  * Support NSH
 -- Open vSwitch team <dev@openvswitch.org>  $(date --rfc-2822)
EOF
debian/rules build; fakeroot debian/rules binary
cp ${BUILD_HOME}/*.deb ${BUILD_DEST}