0f2087c653547728e6539cbeb29d06fd7751e73c
[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 DEPENDS = "glib-2.0 jsoncpp boost chromium protobuf protobuf-native grpc grpc-native"
7
8 SRC_URI = "\
9     git://github.com/igalia/${BPN}.git;branch=@58.agl;protocol=https \
10     file://WebAppMgr.service \
11     file://WebAppMgr.env \
12 "
13 SRCREV = "4fbd6e648913bcf0fba63e4460eb44242c11f71b"
14
15 PV = "ose58.agl"
16
17 S = "${WORKDIR}/git"
18
19 inherit cmake pkgconfig systemd
20
21 EXTRA_OECMAKE = "\
22     -DCMAKE_BUILD_TYPE=Release \
23     -DCMAKE_INSTALL_PREFIX=${prefix} \
24     -DPLATFORM_NAME=${@'${DISTRO}'.upper().replace('-', '_')} \
25     -DCHROMIUM_SRC_DIR=${STAGING_INCDIR}/chromium"
26
27 # Disable some of security flags
28 # Disable D_FORTIFY_SOURCE=2 and -fstack-protector-strong
29 # Refer conf/distro/include/security_flags.inc in meta-webos/conf/distro/include/webos.inc
30 lcl_maybe_fortify = ""
31 SECURITY_STACK_PROTECTOR = ""
32
33 SYSTEMD_SERVICE:${PN} = "WebAppMgr.service"
34
35 do_install:append() {
36     install -v -d ${D}${sysconfdir}/wam
37     install -v -m 644 ${S}/files/launch/security_policy.conf ${D}${sysconfdir}/wam/security_policy.conf
38     install -v -D -m 644 ${WORKDIR}/WebAppMgr.service ${D}${systemd_system_unitdir}/WebAppMgr.service
39     install -v -D -m 644 ${WORKDIR}/WebAppMgr.env ${D}${sysconfdir}/default/WebAppMgr.env
40     ln -snf WebAppMgr ${D}${bindir}/web-runtime
41 }
42
43 CXXFLAGS:append:agl-devel = " -DAGL_DEVEL"
44
45 do_install:append:agl-devel() {
46     # Enable remote inspector and dev mode
47     install -d ${D}${localstatedir}/agl-devel/preferences
48     touch ${D}${localstatedir}/agl-devel/preferences/debug_system_apps
49     touch ${D}${localstatedir}/agl-devel/preferences/devmode_enabled
50 }
51
52 FILES:${PN} += "${sysconfdir}/init ${sysconfdir}/wam ${libdir}/webappmanager/plugins/*.so"
53
54 PROVIDES += "virtual/webruntime"
55 RPROVIDES:${PN} += "virtual/webruntime"
56