From 395d58933f39cce3467ab4691896b3f201e843e0 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Wed, 4 Jul 2018 20:53:15 +0100
Subject: [PATCH] More bmx7 dependencies

---
 src/freedombone-image-customise | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise
index 0b05dea0a..a1ebf5f60 100755
--- a/src/freedombone-image-customise
+++ b/src/freedombone-image-customise
@@ -829,7 +829,7 @@ EOF
 
 install_bmx7() {
     # shellcheck disable=SC2086
-    chroot "$rootdir" $INSTALL_PACKAGES libjson-c-dev zlib1g-dev libiw-dev wget cmake pkg-config
+    chroot "$rootdir" $INSTALL_PACKAGES libjson-c-dev zlib1g-dev libiw-dev wget cmake pkg-config lua5.1 liblua5.1-0-dev dh-autoreconf
 
 
     git clone "$BMX7_REPO" "$rootdir/etc/bmx7"
@@ -847,14 +847,31 @@ if ! make; then
 fi
 make install
 
+cd /etc
+git clone https://github.com/json-c/json-c.git
+cd json-c
+sh ./autogen.sh
+./configure
+if ! make; then
+    exit 2
+fi
+make install
+
+cd /etc
+git clone https://git.openwrt.org/project/libubox.git
+cd libubox
+cmake .
+if ! make; then
+    exit 3
+fi
+make install
+
 cd /etc
 git clone https://git.openwrt.org/project/uci.git
 cd uci
 git checkout 5d2bf09ec594d97eb9284b8c721dbfe10b81a6f6 -b 5d2bf09ec594d97eb9284b8c721dbfe10b81a6f6
-mkdir build
-cd build
-if ! cmake ..; then
-    exit 2
+if ! cmake .; then
+    exit 4
 fi
 make clean all install WOPTS="-pedantic -Wall"
 make install
@@ -862,7 +879,7 @@ make install
 cd /etc/bmx7
 git checkout $BMX7_COMMIT -b $BMX7_COMMIT
 if ! make build_all EXTRA_CFLAGS="-DTRAFFIC_DUMP -DCRYPTLIB=MBEDTLS_${MBEDTLS_VERSION}"; then
-    exit 3
+    exit 5
 fi
 make install
 
-- 
GitLab