SPEC-3723: restructure meta-agl-demo
[AGL/meta-agl-demo.git] / recipes-wam / wam / wam_git.bb
1 SUMMARY = "WAM"
2 AUTHOR = "Jani Hautakangas <jani.hautakangas@lge.com>"
3 LICENSE = "Apache-2.0"
4 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6 inherit cmake
7
8 DEPENDS = "glib-2.0 jsoncpp boost chromium68 wayland-ivi-extension libhomescreen"
9
10 EXTRA_OECMAKE = "\
11     -DCMAKE_BUILD_TYPE=Release \
12     -DCMAKE_INSTALL_PREFIX=${prefix} \
13     -DPLATFORM_NAME=${@'${DISTRO}'.upper().replace('-', '_')} \
14     -DCHROMIUM_SRC_DIR=${STAGING_INCDIR}/chromium68"
15
16 PR="r0"
17
18 PROVIDES += "virtual/webruntime"
19 RPROVIDES_${PN} += "virtual/webruntime"
20
21 SRC_URI = "\
22     git://github.com/igalia/${BPN}.git;branch=WIP@6.agl.compositor;protocol=https \
23     file://WebAppMgr@.service \
24     file://WebAppMgr.env \
25     file://trunc-webapp-roles.patch \
26 "
27 S = "${WORKDIR}/git"
28 SRCREV = "bd650046b688eb1593ae68c16ba3912837507d08"
29
30 do_install_append() {
31     install -d ${D}${sysconfdir}/wam
32     install -v -m 644 ${S}/files/launch/security_policy.conf ${D}${sysconfdir}/wam/security_policy.conf
33     install -d ${D}${systemd_system_unitdir}
34     install -v -m 644 ${WORKDIR}/WebAppMgr@.service ${D}${systemd_system_unitdir}/WebAppMgr@.service
35     install -d ${D}${sysconfdir}/default/
36     install -v -m 644 ${WORKDIR}/WebAppMgr.env ${D}${sysconfdir}/default/WebAppMgr.env
37     ln -snf WebAppMgr ${D}${bindir}/web-runtime
38     install -d ${D}${systemd_system_unitdir}/afm-user-session@.target.wants
39     ln -sf ../WebAppMgr@.service ${D}${systemd_system_unitdir}/afm-user-session@.target.wants/
40 }
41
42 FILES_${PN} += "${sysconfdir}/init ${sysconfdir}/wam ${libdir}/webappmanager/plugins/*.so ${systemd_system_unitdir}"
43
44 CXXFLAGS_append_agl-devel = " -DAGL_DEVEL"
45
46 do_install_append_agl-devel() {
47     # Enable remote inspector and dev mode
48     install -d ${D}${localstatedir}/agl-devel/preferences
49     touch ${D}${localstatedir}/agl-devel/preferences/debug_system_apps
50     touch ${D}${localstatedir}/agl-devel/preferences/devmode_enabled
51 }