blob: 46aacc135ecedcfb5babc41feab2270bcb6b2097 [file] [log] [blame]
Ed Tanousf8ce1242017-11-02 12:58:57 -07001# This recipe requires online access to build, as it uses NPM for dependency
2# management and resolution.
Patrick Venturefd8d54a2018-10-03 13:22:12 -07003PR = "r1"
4PV = "1.0+git${SRCPV}"
Ed Tanousf8ce1242017-11-02 12:58:57 -07005LICENSE = "Apache-2.0"
Ed Tanousf8ce1242017-11-02 12:58:57 -07006LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
Patrick Venturefd8d54a2018-10-03 13:22:12 -07007
8SRC_URI = "git://github.com/openbmc/phosphor-webui.git"
Andrew Geissler374f78b2020-11-02 18:51:43 +00009SRCREV = "d10511f2a7fc07910d7ca517bd73331763322fa0"
Ed Tanousf8ce1242017-11-02 12:58:57 -070010S = "${WORKDIR}/git"
11
12DEPENDS_prepend = "nodejs-native "
13
Ed Tanousf8ce1242017-11-02 12:58:57 -070014inherit allarch
15
Ed Tanousf8ce1242017-11-02 12:58:57 -070016FILES_${PN} += "${datadir}/www/*"
17
18do_compile () {
19 cd ${S}
20 rm -rf node_modules
Jeremy Kerr0a4689a2019-05-31 09:38:04 +080021 npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install
Ed Tanousf8ce1242017-11-02 12:58:57 -070022 npm run-script build
23}
24
25do_install () {
26 # create directory structure
27 install -d ${D}${datadir}/www
28 cp -r ${S}/dist/** ${D}${datadir}/www
29 find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' +
30 find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' +
31}
32