diff --git a/userpatches/customize-image.sh b/userpatches/customize-image.sh index 502240e..c3fc54b 100644 --- a/userpatches/customize-image.sh +++ b/userpatches/customize-image.sh @@ -94,6 +94,9 @@ Main() { # framebuffer-vncserver /root/framebuffer-vncserver-build.sh + # hamlib + /root/hamlib-build.sh + # cleanup image rm -rf /root/build/ apt-get clean diff --git a/userpatches/overlay/root/hamlib-build.sh b/userpatches/overlay/root/hamlib-build.sh new file mode 100755 index 0000000..f211bce --- /dev/null +++ b/userpatches/overlay/root/hamlib-build.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +mkdir -p /root/build +cd /root/build + +BASE_DIR=/root/build/Hamlib + +mkdir -p /root/build +cd /root/build + +if [ ! -e "${BASE_DIR}" ] ; then + git clone --depth=1 https://github.com/Hamlib/Hamlib.git +fi + +cd "${BASE_DIR}" +git pull + +mkdir -p "${BASE_DIR}/build" +cd "${BASE_DIR}/build" + +../bootstrap +../configure --prefix="" --host=arm-linux-gnueabihf --libdir=/lib/arm-linux-gnueabihf --without-cxx-binding + +make -f $(nproc) +make install + +cd "${BASE_DIR}" + +# cleanup +if [ -e "${BASE_DIR}/build" ] ; then + rm -rf "${BASE_DIR}/build" +fi \ No newline at end of file