DESCRIPTION = "Leahi application" LICENSE = "CLOSED" SRC_URI = "git://git@bitbucket.org/diality-cloud/leahi-distro-manufact.git;protocol=ssh;branch=staging" SRCREV = "${AUTOREV}" S = "${WORKDIR}/git/UI/${BUILD_VARIANT}" inherit systemd SYSTEMD_SERVICE:${PN} = "leahi.service cloudconnect.service" INSANE_SKIP:${PN} += "already-stripped dev-so" install_leahi() { bbplain " ---------- Leahi: Install : <${BUILD_VARIANT}> [leahi]" 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 find ${D}/opt/leahi/scripts/ -name "*.sh" -exec chmod 755 {} \; mv ${D}/opt/leahi/scripts/run.sh ${D}/opt/leahi/run.sh install -d ${D}${systemd_system_unitdir} install -m 644 ${S}/leahi/leahi.service ${D}${systemd_system_unitdir} } 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 \ "