2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> scripts/opflex-build.sh"
13 # Build script for opflex
18 ROOT=/tmp/opflex-prefix
21 if [ -d "$ROOT" ]; then rm -rf "$ROOT"; fi
24 # create dependency root prefix
29 # Download the artifacts from nexus thirdparty
30 wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/openvswitch/openvswitch/${OPENVSWITCH_VERSION}/openvswitch-${OPENVSWITCH_VERSION}.tar.gz
31 wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/rapidjson/rapidjson/${RAPIDJSON_VERSION}/rapidjson-${RAPIDJSON_VERSION}.tar.gz
32 wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/libuv/libuv/${LIBUV_VERSION}/libuv-${LIBUV_VERSION}.tar.gz
34 tar -xz -C "$ROOT" --strip-components=2 -f libuv-${LIBUV_VERSION}.tar.gz
35 tar -xz -C "$ROOT" --strip-components=2 -f rapidjson-${RAPIDJSON_VERSION}.tar.gz
36 tar -xz -C "$ROOT" --strip-components=2 -f openvswitch-${OPENVSWITCH_VERSION}.tar.gz
38 export PATH="$ROOT/bin:$PATH"
39 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ROOT/lib"
40 export PKG_CONFIG_PATH="$ROOT/lib/pkgconfig"
42 # Move OpFlex artifacts to upload files directory
43 UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
44 mkdir -p "$UPLOAD_FILES_PATH"
49 ./configure --prefix="$ROOT" \
50 --with-buildversion=$BUILD_NUMBER \
51 CPPFLAGS="-isystem $ROOT/include" \
54 if ! make check; then find . -name test-suite.log -exec cat {} \; && false; fi
57 mv *.tar.gz "$UPLOAD_FILES_PATH"
62 CLASSPATH=target/classes java org.opendaylight.opflex.genie.Genie
63 pushd target/libmodelgbp
65 ./configure --prefix="$ROOT"
69 mv *.tar.gz "$UPLOAD_FILES_PATH"
76 ./configure --prefix="$ROOT" \
77 --with-buildversion=$BUILD_NUMBER \
78 CPPFLAGS="-isystem $ROOT/include" \
81 if ! make check; then find . -name test-suite.log -exec cat {} \; && false; fi
83 mv *.tar.gz "$UPLOAD_FILES_PATH"