<commit_before>SUMMARY = "ARM mbed edge"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://edge-core-dev \
           file://edge-core \
           file://lorapt-example \
           file://pt-example \
           file://pt-example_1520 \
           file://mec \
           file://mec.service \
           file://arm_update_activate.sh \
           file://arm_update_active_details.sh \
           file://arm_update_prepare.sh"

inherit systemd update-rc.d

SYSTEMD_SERVICE_${PN} = "mec.service"
INITSCRIPT_NAME = "mec"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 77 0 1 2 6 ."

do_install() {
    # Developer mode
    mkdir -p ${D}/tools
    install -d ${D}/tools
    install -m 755 ${WORKDIR}/edge-core-dev ${D}/tools/

    # Standard version
    install -d ${D}/${bindir}
    install -m 755 ${WORKDIR}/edge-core ${D}/${bindir}
    install -m 755 ${WORKDIR}/lorapt-example ${D}/${bindir}
    install -m 755 ${WORKDIR}/pt-example ${D}/${bindir}
    install -m 755 ${WORKDIR}/pt-example_1520 ${D}/${bindir}
    install -m 755 ${WORKDIR}/arm_update_activate.sh ${D}/usr/sbin/
    install -m 755 ${WORKDIR}/arm_update_active_details.sh ${D}/usr/sbin/
    install -m 755 ${WORKDIR}/arm_update_prepare.sh ${D}/usr/sbin/

    # SysV
    if ${<EMAIL>.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
        install -d ${D}${sysconfdir}/init.d
        install -m 0755 ${WORKDIR}/mec ${D}${sysconfdir}/init.d/mec
    fi

    # Systemd
    if ${@<EMAIL>('DISTRO_FEATURES','systemd','true','false',d)}; then
        install -d ${D}${systemd_unitdir}/system
        install -m 0644 ${WORKDIR}/mec.service ${D}${systemd_unitdir}/system
    fi
}

RDEPENDS_${PN} += "libevent jansson mosquitto"

FILES_${PN} += "${bindir} /tools"<commit_msg>[EdgeSense] Fix do_install error for mbed-edge<commit_after>SUMMARY = "ARM mbed edge"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://edge-core-dev \
           file://edge-core \
           file://lorapt-example \
           file://pt-example \
           file://pt-example_1520 \
           file://mec \
           file://mec.service \
           file://arm_update_activate.sh \
           file://arm_update_active_details.sh \
           file://arm_update_prepare.sh"

inherit systemd update-rc.d

SYSTEMD_SERVICE_${PN} = "mec.service"
INITSCRIPT_NAME = "mec"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 77 0 1 2 6 ."

do_install() {
    # Developer mode
    mkdir -p ${D}/tools
    install -d ${D}/tools
    install -m 755 ${WORKDIR}/edge-core-dev ${D}/tools/

    # Standard version
    install -d ${D}/${bindir}
    install -m 755 ${WORKDIR}/edge-core ${D}/${bindir}
    install -m 755 ${WORKDIR}/lorapt-example ${D}/${bindir}
    install -m 755 ${WORKDIR}/pt-example ${D}/${bindir}
    install -m 755 ${WORKDIR}/pt-example_1520 ${D}/${bindir}

    # Scripts for OTA update
    install -d ${D}/usr/sbin
    install -m 755 ${WORKDIR}/arm_update_activate.sh ${D}/usr/sbin/
    install -m 755 ${WORKDIR}/arm_update_active_details.sh ${D}/usr/sbin/
    install -m 755 ${WORKDIR}/arm_update_prepare.sh ${D}/usr/sbin/

    # SysV
    if ${<EMAIL>.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
        install -d ${D}${sysconfdir}/init.d
        install -m 0755 ${WORKDIR}/mec ${D}${sysconfdir}/init.d/mec
    fi

    # Systemd
    if ${<EMAIL>.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
        install -d ${D}${systemd_unitdir}/system
        install -m 0644 ${WORKDIR}/mec.service ${D}${systemd_unitdir}/system
    fi
}

RDEPENDS_${PN} += "libevent jansson mosquitto"

FILES_${PN} += "${bindir} /usr/sbin /tools"
{'fraction_non_alphanumeric': 0.17358892438764642, 'fraction_numerical': 0.036741214057507986, 'mean_word_length': 2.8375893769152194, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2646285', 'n_tokens_mistral': 1492, 'n_tokens_neox': 1375, 'n_words': 260}