51447efd910263ac8b1105d085c3fa34caaa3b24
[AGL/meta-agl-devel.git] / meta-html5-framework / 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 libwindowmanager"
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 = "git://github.com/webosose/${PN}.git;branch=@6.agl.guppy;protocol=https"
22 S = "${WORKDIR}/git"
23 SRCREV = "8271e13578b92b192cef1d1ac6577bc3699518a4"
24
25 do_install_append() {
26     install -d ${D}${sysconfdir}/wam
27     install -v -m 644 ${S}/files/launch/security_policy.conf ${D}${sysconfdir}/wam/security_policy.conf
28     install -d ${D}${systemd_user_unitdir}
29     install -v -m 644 ${S}/files/launch/WebAppMgr.service ${D}${systemd_user_unitdir}/WebAppMgr.service
30     install -d ${D}${sysconfdir}/default/
31     install -v -m 644 ${S}/files/launch/WebAppMgr.env ${D}${sysconfdir}/default/WebAppMgr.env
32     ln -snf WebAppMgr ${D}${bindir}/web-runtime
33     install -d ${D}${sysconfdir}/systemd/user/default.target.wants
34     ln -sf ${systemd_user_unitdir}/WebAppMgr.service ${D}${sysconfdir}/systemd/user/default.target.wants
35 }
36
37 pkg_postinst_${PN}_append() {
38     chsmack -a "*" /usr/bin/WebAppMgr
39     chsmack -a "*" /usr/lib/libWebAppMgr.so.1.0.0
40     chsmack -a "*" /usr/lib/libWebAppMgrCore.so.1.0.0
41     chsmack -a "*" /usr/lib/webappmanager/plugins/libwebappmgr-default-plugin.so
42 }
43
44 RDEPENDS_${PN} += "wam-tinyproxy"
45 FILES_${PN} += "${sysconfdir}/init ${sysconfdir}/wam ${libdir}/webappmanager/plugins/*.so ${systemd_user_unitdir}"
46
47 CXXFLAGS_append_agl-devel = " -DAGL_DEVEL"