Index: conf/distro/ely.conf =================================================================== diff -u -rb9c465ac891ff15a975edc56f12156dd99b73e01 -r4174eed96baa075dc69142e768f6eab887f3bff4 --- conf/distro/ely.conf (.../ely.conf) (revision b9c465ac891ff15a975edc56f12156dd99b73e01) +++ conf/distro/ely.conf (.../ely.conf) (revision 4174eed96baa075dc69142e768f6eab887f3bff4) @@ -16,6 +16,8 @@ # ELY_BUILD = "3" # Added Virual CAN ELY_BUILD = "4" +# Added CloudConnect +ELY_BUILD = "5" # Remove Digi services CCCS_PKGS = " " Index: recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb =================================================================== diff -u -re25534f4dbc98506f7809cd5baa555aaca72159f -r4174eed96baa075dc69142e768f6eab887f3bff4 --- recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (.../leahi-manufacturing_1.0.bb) (revision e25534f4dbc98506f7809cd5baa555aaca72159f) +++ recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (.../leahi-manufacturing_1.0.bb) (revision 4174eed96baa075dc69142e768f6eab887f3bff4) @@ -1,70 +1,93 @@ DESCRIPTION = "Leahi application" LICENSE = "CLOSED" -# Leahi repository including all needed binary and resources SRC_URI = "git://git@bitbucket.org/diality-cloud/leahi-distro-manufact.git;protocol=ssh;branch=staging" - -# always use the latest commit. SRCREV = "${AUTOREV}" - -# the cloned repo is located in the ${WORKDIR}/git/UI/ S = "${WORKDIR}/git/UI/${BUILD_VARIANT}" -# Optionally, you can specify a specific tag or branch to use -# PV = "1.0+git${SRCPV}" - -# define the leahi service inherit systemd -SYSTEMD_SERVICE:${PN} = "leahi.service" -# TODO -# 1 - get files from git repository -do_install() { - bbplain " ---------- Leahi: Install : <${BUILD_VARIANT}>" - # build the required folders - install -d ${D}/opt/leahi - install -d ${D}/opt/leahi/scripts - install -d ${D}/opt/leahi/translations - install -d ${D}/opt/leahi/configurations +SYSTEMD_SERVICE:${PN} = "leahi.service cloudconnect.service" - # installing the required files - install -m 0644 ${S}/leahi ${D}/opt/leahi/ - install -m 0644 ${S}/run.sh ${D}/opt/leahi/ - install -m 0644 ${S}/eglfs.json ${D}/opt/leahi/ - install -m 0644 ${S}/scripts/* ${D}/opt/leahi/scripts/ - install -m 0644 ${S}/translations/*.qm ${D}/opt/leahi/translations/ +INSANE_SKIP:${PN} += "already-stripped dev-so" - CONFS="${S}/configurations" - CONFD="${D}/opt/leahi/configurations" - for d in $(find ${CONFS}/* -type d);do - directory=`basename ${d}` - install -d ${CONFD}/${directory}; - find ${CONFS}/${directory}/* ! -name *.*~ -type f -exec \ - install -m 644 {} ${CONFD}/${directory}/ \ - \; - done +install_leahi() { + bbplain " ---------- Leahi: Install : <${BUILD_VARIANT}> [leahi]" - # give the execution permission to owner + install -d ${D}/opt/leahi + install -d ${D}/opt/leahi/scripts + install -d ${D}/opt/leahi/translations + install -d ${D}/opt/leahi/configurations + + install -m 0644 ${S}/leahi/leahi ${D}/opt/leahi/ + install -m 0644 ${S}/leahi/run.sh ${D}/opt/leahi/ + install -m 0644 ${S}/leahi/eglfs.json ${D}/opt/leahi/ + + # Use a loop or specific files for wildcards in install command + cp -r ${S}/leahi/scripts/* ${D}/opt/leahi/scripts/ + cp -r ${S}/leahi/translations/*.qm ${D}/opt/leahi/translations/ + cp -r ${S}/leahi/configurations/* ${D}/opt/leahi/configurations/ + chmod 755 ${D}/opt/leahi/leahi chmod 755 ${D}/opt/leahi/run.sh - chmod 755 ${D}/opt/leahi/scripts/*.sh - # move the run.sh from script folder to the main folder of the leahi execution. + find ${D}/opt/leahi/scripts/ -name "*.sh" -exec chmod 755 {} \; + mv ${D}/opt/leahi/scripts/run.sh ${D}/opt/leahi/run.sh - # setting up the leahi service - install -d ${D}${systemd_system_unitdir} - install -m 644 ${S}/leahi.service ${D}${systemd_system_unitdir} + install -d ${D}${systemd_system_unitdir} + install -m 644 ${S}/leahi/leahi.service ${D}${systemd_system_unitdir} } -FILES:${PN} += "/opt/leahi/*" +install_cloudconnect() { + bbplain " ---------- Leahi: Install : <${BUILD_VARIANT}> [cloudconnect]" + install -d ${D}/opt/cloud + install -d ${D}/opt/cloud/lib + install -d ${D}/opt/cloud/config + install -d ${D}/opt/cloud/config/ssl + install -d ${D}/opt/cloud/config/ssl/certs + install -d ${D}/opt/cloud/config/ssl/private + + install -m 0755 ${S}/cloud/CloudConnect ${D}/opt/cloud/ + cp -a ${S}/cloud/lib/* ${D}/opt/cloud/lib/ + + # FIX: Use cp -p or install for wildcards + cp -p ${S}/cloud/config/*.ini ${D}/opt/cloud/config/ + cp -p ${S}/cloud/config/ssl/certs/* ${D}/opt/cloud/config/ssl/certs/ + cp -p ${S}/cloud/config/ssl/private/* ${D}/opt/cloud/config/ssl/private/ + + install -d ${D}${systemd_system_unitdir} + install -m 644 ${S}/cloud/cloudconnect.service ${D}${systemd_system_unitdir} +} + +install_drydemo() { + bbplain " ---------- Leahi: Install : <${BUILD_VARIANT}> [drydemo]" +} + +do_install() { + install_leahi + install_cloudconnect + install_drydemo + + # Assign ownership to your custom roles + chown -R root:root ${D}/opt/leahi + chown -R root:root ${D}/opt/cloud +} + +FILES:${PN} += " \ + /opt/leahi/* \ + /opt/cloud/* \ + ${systemd_system_unitdir}/*.service \ +" + RDEPENDS:${PN} += " \ + zlib \ qtbase \ qtconnectivity \ qtserialbus \ qtdeclarative \ qtquickcontrols \ qtcharts \ - qtscxml \ + qtscxml \ "