From 56ebf697eb35021fe32797713b20d92a7c484b2d Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 18 Nov 2016 19:41:27 +0200 Subject: openivi-html5_git.bb: Add OpenIVI Mobility HTML5 OpenIVI Mobility brings HTML5 environment for running web applications on top of AGL. It is powered by QtWebKit therefore the Yocto/OE recipe depends on meta-qt5. Bug-AGL: SPEC-330 Change-Id: I8c16a4082db2e42d8f50403eb43cd1e1c847ac1b Signed-off-by: Leon Anavi --- .../openivi-html5/openivi-html5.service | 14 +++++++ .../openivi-html5/openivi-html5/openivi-html5.sh | 9 +++++ recipes-openivi/openivi-html5/openivi-html5_git.bb | 43 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service create mode 100644 recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh create mode 100644 recipes-openivi/openivi-html5/openivi-html5_git.bb diff --git a/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service b/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service new file mode 100644 index 000000000..df14ccb4a --- /dev/null +++ b/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service @@ -0,0 +1,14 @@ +[Unit] +Description=HTML5 runtime for OpenIVI Mobility applications +Requires=dbus.service +After=dbus.service lightmediascanner.service rygel.service weston.service + +[Service] +User=root +ExecStart=/usr/bin/openivi-html5.sh +Restart=always +RestartSec=2 +TimeoutStopSec=1 + +[Install] +WantedBy=multi-user.target diff --git a/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh b/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh new file mode 100644 index 000000000..ed8a56144 --- /dev/null +++ b/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/$UID + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR +fi + +/usr/bin/openivi-html5 -f -u /usr/share/openivi/example/cluster/index.html diff --git a/recipes-openivi/openivi-html5/openivi-html5_git.bb b/recipes-openivi/openivi-html5/openivi-html5_git.bb new file mode 100644 index 000000000..1e6a96b29 --- /dev/null +++ b/recipes-openivi/openivi-html5/openivi-html5_git.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "OpenIVI Mobility HTML5 environment" +HOMEPAGE = "https://openivimobility.github.io/" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4641e94ec96f98fabc56ff9cc48be14b" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI = " \ + git://github.com/openivimobility/openivi-html5.git;branch=master;tag=7e5d9574758e504b194d16a52e04a1cfe4320138 \ + file://openivi-html5.sh \ + file://openivi-html5.service \ +" + +inherit pkgconfig cmake_qt5 externalsrc systemd +PV = "0.1" +PR = "r0" + +S = "${WORKDIR}/git" + +SYSTEMD_SERVICE_${PN} = "openivi-html5.service" + +RDEPENDS_${PN} = "qtbase qtwebkit" +DEPENDS = "qtbase-native qtbase qtwebkit" + +EXTRA_OECMAKE = " -DCMAKE_DISABLE_FIND_PACKAGE_X11=TRUE " + +FILES_${PN} = "/usr/bin/openivi-html5 /usr/share/openivi/*" + +do_install() { + install -d ${D}${bindir} + install -m 0755 openivi-html5 ${D}${bindir} + + install -d ${D}${datadir}/openivi/ + cp -r ${S}/example ${D}${datadir}/openivi/ + + install -p -D ${WORKDIR}/openivi-html5.sh ${D}${bindir}/openivi-html5.sh + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -p -D ${WORKDIR}/openivi-html5.service ${D}${systemd_unitdir}/system/openivi-html5.service + fi +} + +FILES_${PN} += " ${prefix}/bin/openivi-html5.sh" -- cgit 1.2.3-korg