<commit_before><commit_msg>added mcip-tool build script<commit_after>#!/bin/sh

# download link for the sources to be stored in dl directory
PKG_DOWNLOAD="https://github.com/insys-icom/mcip-tool/archive/v1.tar.gz"

# md5 checksum of archive in dl directory
PKG_CHECKSUM="99da785f28de5eaa7ca03c36cb69984c"

# name of directory after extracting the archive in working directory
PKG_DIR="mcip-tool-1"

# name of the archive in dl directory
PKG_ARCHIVE_FILE="${PKG_DIR}.tar.gz"

SCRIPTSDIR="$(dirname $0)"
HELPERSDIR="${SCRIPTSDIR}/helpers"
TOPDIR="$(realpath ${SCRIPTSDIR}/../..)"

. ${TOPDIR}/scripts/common_settings.sh
. ${HELPERSDIR}/functions.sh

PKG_ARCHIVE="${DOWNLOADS_DIR}/${PKG_ARCHIVE_FILE}"
PKG_SRC_DIR="${SOURCES_DIR}/${PKG_DIR}"
PKG_BUILD_DIR="${BUILD_DIR}/${PKG_DIR}"
PKG_INSTALL_DIR="${PKG_BUILD_DIR}/install"

configure()
{
    true
}

compile()
{
    copy_overlay
    cd "${PKG_BUILD_DIR}"

    export CC="${M3_CROSS_COMPILE}gcc"
    export CFLAGS="${M3_CFLAGS} -I${STAGING_INCLUDE}"
    export LDFLAGS="-L${STAGING_LIB}"

    make "${M3_MAKEFLAGS}" || exit_failure "failed to build ${PKG_DIR}"
}

install_staging()
{
    cd "${PKG_BUILD_DIR}"
    cp "mcip-tool" "${STAGING_DIR}/bin"
}

uninstall_staging()
{
    rm "${STAGING_DIR}/bin/mcip-tool"
}

. ${HELPERSDIR}/call_functions.sh
{'fraction_non_alphanumeric': 0.16114109483423283, 'fraction_numerical': 0.01927525057825752, 'mean_word_length': 5.49, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2475056', 'n_tokens_mistral': 528, 'n_tokens_neox': 501, 'n_words': 84}