567d1d6696675482cbeefe1c6ae806e7cde1260a
[AGL/meta-agl-demo.git] / recipes-demo / html5-homescreen / html5-homescreen_git.bb
1 SUMMARY     = "AGL HTML5 Homescreen"
2 HOMEPAGE    = "https://git.automotivelinux.org/apps/html5-homescreen/"
3 SECTION     = "apps"
4 LICENSE     = "Apache-2.0"
5 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
6
7 SRC_URI = " \
8     git://gerrit.automotivelinux.org/gerrit/apps/html5-homescreen;protocol=https;branch=master \
9     file://homescreen.service \
10 "
11 SRCREV = "32098508fa7375690ea1b8dc9da4e7ca641494c1"
12
13 PV      = "1.0+git${SRCPV}"
14 S       = "${WORKDIR}/git"
15 B       = "${WORKDIR}/build"
16
17 inherit pythonnative systemd
18
19 DEPENDS = "nodejs-native"
20
21 do_compile[network] = "1"
22 do_compile() {
23     cd ${S}
24     rm -rf package node_modules package-lock.json
25     npm install
26     npm run build
27 }
28
29 WAM_APPLICATIONS_DIR = "${libdir}/wam_apps"
30
31 SYSTEMD_SERVICE:${PN} = "homescreen.service"
32
33 do_install() {
34     install -d ${D}${WAM_APPLICATIONS_DIR}/${PN}
35     cp -R --no-dereference --preserve=mode,links ${S}/dist/* ${D}${WAM_APPLICATIONS_DIR}/${PN}
36     install -D -m 0644 ${WORKDIR}/homescreen.service ${D}${systemd_system_unitdir}/homescreen.service
37 }
38
39 FILES:${PN} = " \
40     ${WAM_APPLICATIONS_DIR}/${PN} \
41     ${systemd_system_unitdir} \
42 "
43
44 RCONFLICTS:${PN} = "homescreen flutter-homescreen"
45 RDEPENDS:${PN} = "applaunchd html5-background"