52d4701f70d1c45688ae19badb637c730edff346
[apex.git] / build / build_ovs_nsh.sh
1 #!/usr/bin/env bash
2 ##############################################################################
3 # Copyright (c) 2016 Tim Rozet (Red Hat) and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 set -e
11
12 yum -y install  rpm-build autoconf automake libtool systemd-units openssl openssl-devel python python-twisted-core python-zope-interface python-six desktop-file-utils groff graphviz  procps-ng libcap-ng libcap-ng-devel PyQt4 selinux-policy-devel kernel-devel kernel-headers kernel-tools
13 ./boot.sh
14 libtoolize --force
15 aclocal
16 autoheader
17 automake --force-missing --add-missing
18 autoconf
19 ./configure
20 yum -y install rpmdevtools
21 # hack due to build pulling in kernel vxlan header
22 kernel_vxlan="/usr/src/kernels/$(rpm -q kernel-headers | grep -Eo '[0-9].*x86_64')/include/net/vxlan.h"
23 sed -i '/struct vxlan_metadata {/a\        u32             gpe;' $kernel_vxlan
24 make rpm-fedora RPMBUILD_OPT="\"-D kversion `rpm -q kernel | rpmdev-sort  | tail -n -1 | sed  's/^kernel-//'`\" --without check"
25 make rpm-fedora-kmod RPMBUILD_OPT="\"-D kversion `rpm -q kernel | rpmdev-sort  | tail -n -1 | sed  's/^kernel-//'`\""