summaryrefslogtreecommitdiffstats
path: root/scripts/build-sysrepo.sh
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-12-02 14:28:22 +0100
committerLuca Muscariello <muscariello@ieee.org>2019-12-04 09:45:43 +0000
commit2bfd3335ff11281d703cb7f422bb17da2d3a6bcd (patch)
tree278c097859d17c3f96c84d432ab1ef5c80e9a6d2 /scripts/build-sysrepo.sh
parent3e0ff4e7897bb8bc03538f1b2643fe73de158714 (diff)
to fix HICN-421 by adding cpack to libyang and sysrepo
Signed-off-by: Luca Muscariello <muscariello@ieee.org> Change-Id: Ia9e0752f877c7fc0be6df85664d18e1caad86741 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'scripts/build-sysrepo.sh')
-rw-r--r--scripts/build-sysrepo.sh36
1 files changed, 29 insertions, 7 deletions
diff --git a/scripts/build-sysrepo.sh b/scripts/build-sysrepo.sh
index 205fcc6bd..e51b25f4a 100644
--- a/scripts/build-sysrepo.sh
+++ b/scripts/build-sysrepo.sh
@@ -97,12 +97,22 @@ setup_fdio_repo() {
# Install dependencies
if [ ${DISTRIB_ID} == "ubuntu" ]; then
echo ${BUILD_TOOLS_UBUNTU} ${DEPS_UBUNTU} | xargs sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends
- curl -OL https://github.com/muscariello/build-scripts/raw/master/deb/libyang_0.16-r2_amd64.deb
- curl -OL https://github.com/muscariello/build-scripts/raw/master/deb/sysrepo_0.7.7_amd64.deb
sudo ${apt_get} clean && sudo ${apt_get} update
- sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends ./libyang_0.16-r2_amd64.deb ./sysrepo_0.7.7_amd64.deb
+ sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends libpcre3-dev
elif [ ${DISTRIB_ID} == "centos" ]; then
- echo "not supported yet"
+ # echo ${BUILD_TOOLS_GROUP_CENTOS} | xargs sudo yum groupinstall -y --nogpgcheck
+ echo ${DEPS_CENTOS} | xargs sudo yum install -y --nogpgcheck
+ sudo yum install devtoolset-7 pcre-devel
+
+ c++ --version
+
+ CXX_COMPILER="/opt/rh/devtoolset-7/root/usr/bin/c++"
+ CC_COMPILER="/opt/rh/devtoolset-7/root/usr/bin/cc"
+
+ ${CXX_COMPILER} --version
+ ${CC_COMPILER} --version
+
+ export CC=${CC_COMPILER} CXX=${CXX_COMPILER}
fi
# do nothing but check compiler version
@@ -122,14 +132,26 @@ build_package() {
mkdir -p build && pushd build
rm -rf *
-# cp ${SCRIPT_PATH}/../cmake/Modules/Packager.cmake ${SCRIPT_PATH}/../ctrl/sysrepo-plugin/cmake/
- cmake -DCMAKE_INSTALL_PREFIX=/usr ${SCRIPT_PATH}/../ctrl/sysrepo-plugins/ \
- -DSR_PLUGINS_DIR=/usr/lib/x86_64-linux-gnu/sysrepo/plugins
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ${SCRIPT_PATH}/../extras/libyang
+ make install
make package
find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true
rm *Unspecified* || true
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ${SCRIPT_PATH}/../extras/sysrepo
+ make install
+ make package
+
+ find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true
+ rm *Unspecified* || true
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_HICNPLUGIN=ON -DBUILD_HICNLIGHT=OFF \
+ -DBUILD_LIBTRANSPORT=OFF -DBUILD_UTILS=OFF -DBUILD_CTRL=OFF \
+ -DBUILD_SYSREPOPLUGIN=ON ${SCRIPT_PATH}/..
+ make install
+ make package
+
popd
echo "*******************************************************************"