Fix broken build dependency
[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 \
13 openssl openssl-devel python python-twisted-core python-zope-interface \
14 python-six desktop-file-utils groff graphviz  procps-ng libcap-ng \
15 libcap-ng-devel PyQt4 selinux-policy-devel
16 ./boot.sh
17 libtoolize --force
18 aclocal
19 autoheader
20 automake --force-missing --add-missing
21 autoconf
22 ./configure
23 yum -y install rpmdevtools
24 # hack due to build pulling in kernel vxlan header
25 kernel_vxlan="/usr/src/kernels/$(rpm -q kernel | grep -Eo '[0-9].*x86_64')/include/net/vxlan.h"
26 sed -i '/struct vxlan_metadata {/a\        u32             gpe;' $kernel_vxlan
27 make rpm-fedora RPMBUILD_OPT="\"-D kversion `rpm -q kernel | rpmdev-sort  | tail -n -1 | sed  's/^kernel-//'`\" --without check"
28 make rpm-fedora-kmod RPMBUILD_OPT="\"-D kversion `rpm -q kernel | rpmdev-sort  | tail -n -1 | sed  's/^kernel-//'`\""