3 ##############################################################################
4 # Copyright (c) 2019 Huawei Tech and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
14 # set the docker name and docker tag when you build
15 # export DOCKER_NAME=eliot/opc-ua
16 # export DOCKER_TAG=latest
18 export ELIOT_DIR=$(cd $(dirname $0); pwd)
19 export WORK_DIR=$ELIOT_DIR/work
20 export CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz
21 export SCONS_PPA_URL=http://repo.okay.com.mx/centos/7/x86_64/release//scons-2.3.0-1.el7.centos.noarch.rpm
22 export GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
23 export OPCUA_REPO=https://github.com/edgexfoundry-holding/protocol-opcua-c.git
24 export DOCKER_NAME=${DOCKER_NAME:-"eliot/opc-ua"}
25 export DOCKER_TAG=${DOCKER_TAG:-"latest"}
27 # Clean and Create the work directory
31 yum install -y gcc git wget
32 yum groupinstall -y 'Development Tools'
33 # Get the package and source code
41 rpm -Uvh scons-2.3.0-1.el7.centos.noarch.rpm
44 # Build and Install camke
45 tar xzf cmake-3.15.2.tar.gz
46 cd ${WORK_DIR}/cmake-3.15.2
51 # Build the opc-ua server and client
52 cd ${WORK_DIR}/protocol-opcua-c/
56 echo "####################################################"
57 echo "# If you want to start the server, follow below steps"
58 echo "# cd ${WORK_DIR}/protocol-opcua-c/example/out"
60 echo "####################################################"