From b10711d42e65c1ae604891d33cfd83628ca7aa64 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 13:04:11 +0100 Subject: build-submodules: add libyang --- .gitmodules | 5 ++++- packages/libyang | 1 + scripts/build-submodules | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 160000 packages/libyang diff --git a/.gitmodules b/.gitmodules index 22bb87d5..30793200 100644 --- a/.gitmodules +++ b/.gitmodules @@ -236,4 +236,7 @@ [submodule "packages/igmpproxy"] path = packages/igmpproxy url = https://github.com/vyos/igmpproxy.git - branch = current \ No newline at end of file + branch = current +[submodule "packages/libyang"] + path = packages/libyang + url = https://github.com/opensourcerouting/libyang.git diff --git a/packages/libyang b/packages/libyang new file mode 160000 index 00000000..179da47f --- /dev/null +++ b/packages/libyang @@ -0,0 +1 @@ +Subproject commit 179da47f2e8def1907372408a9df97a0dcbc1347 diff --git a/scripts/build-submodules b/scripts/build-submodules index 0d11c059..b3ea2c1a 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -140,6 +140,44 @@ if [ $INIT_PACKAGES ]; then initialize_packages fi +build_libyang() { + PKG=libyang + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) + if ! package_in_buildlist $1; then + return 0 + fi + status_start "Building package: $PKG Commit id: $COMMITID" + if [ ! -f "$PKGDIR/$PKG/README.md" ]; then + status_skip "No source for: $PKG" + return 1 + fi + + ( set -e; set -x + cd $PKGDIR/$PKG + git checkout 179da47f2e8de + + git clean -dxf + git reset --hard + + mkdir build + cd build + + cmake .. + make build-deb + + cp debs/* $PKGDIR + + ) >>$PKGDIR/$PKG.buildlog 2>&1 + + if [ $? -ne 0 ]; then + status_fail + error_msg "Failed to build package $PKG, look in $PKG.buildlog to examine the fault\n" + return 2 + fi + status_ok +} +build_libyang + build_frr() { PKG=frr COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) -- cgit v1.2.3