diff --git a/scripts/install-voacap.sh b/scripts/install-voacap.sh index 2e60a61..bdddf8b 100755 --- a/scripts/install-voacap.sh +++ b/scripts/install-voacap.sh @@ -1,8 +1,8 @@ #!/bin/bash # Author : Gaston Gonzalez # Date : 5 June 2023 -# Updated : 16 August 2025 -# Purpose : Install Dire Wolf +# Updated : 2 September 2025 +# Purpose : Install voacapl # # References: # 1. https://github.com/jawatson/voacapl @@ -13,32 +13,44 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR . ./env.sh +. ../overlay/opt/emcomm-tools/bin/et-common APP=voacapl VERSION=0.7.6 -REPO=https://github.com/thetechprepper/voacapl -REPO_SRC_DIR="/opt/src/${APP}" +DOWNLOAD_FILE=voacapl-master.zip INSTALL_DIR="/opt/${APP}-${VERSION}" LINK_PATH="/opt/${APP}" et-log "Installing voacapl build dependencies..." apt install gfortran -y -[[ ! -e ${ET_SRC_DIR} ]] && mkdir ${ET_SRC_DIR} +if [[ ! -e ${ET_DIST_DIR}/${DOWNLOAD_FILE} ]]; then + + URL="https://github.com/thetechprepper/voacapl/archive/refs/heads/master.zip" + + et-log "Downloading ${APP}: ${URL}" + download_with_retries ${URL} ${DOWNLOAD_FILE} + + mv -v ${DOWNLOAD_FILE} ${ET_DIST_DIR} +fi CWD_DIR=`pwd` -if [[ ! -e ${REPO_SRC_DIR} ]]; then - cd ${ET_SRC_DIR} && git clone ${REPO} +# Only build once +if [[ ! -e "${ET_SRC_DIR}/${APP}/${BIN_FILE}" ]]; then + cd ${ET_SRC_DIR} + unzip -o ${ET_DIST_DIR}/${DOWNLOAD_FILE} + + cd voacapl-master + + et-log "Building ${APP}.." + ./configure --prefix=${INSTALL_DIR} + make && make install + + # patch prefix location + sed -i 's|__PREFIX__|/opt/voacapl-0.7.6|' makeitshfbc fi -cd ${REPO_SRC_DIR} -./configure --prefix=${INSTALL_DIR} -make && make install - -# patch prefix location -sed -i 's|__PREFIX__|/opt/voacapl-0.7.6|' makeitshfbc - [[ -e /root/itshfbc ]] && rm -rf /root/itshfbc [[ -e /etc/skel/itshfbc ]] && rm -rf /etc/skel/itshfbc