blob: f32cc1dcfcba9f46b3dd2fe025667df11993c951 [file] [log] [blame]
Ed Tanous760881a2017-11-02 12:58:57 -07001# This recipe requires online access to build, as it uses NPM for dependency
2# management and resolution.
Patrick Venturee28f3872018-10-03 13:22:12 -07003PR = "r1"
4PV = "1.0+git${SRCPV}"
Ed Tanous760881a2017-11-02 12:58:57 -07005LICENSE = "Apache-2.0"
Ed Tanous760881a2017-11-02 12:58:57 -07006LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
Patrick Venturee28f3872018-10-03 13:22:12 -07007
Patrick Williamsbb99d222022-01-24 15:55:09 -06008SRC_URI = "git://github.com/openbmc/phosphor-webui.git;branch=master;protocol=https"
Andrew Geisslere0f9f582021-11-10 01:11:14 +00009SRCREV = "f59274e8ec337e7f4b135726d6b846fb813d60cb"
Ed Tanous760881a2017-11-02 12:58:57 -070010S = "${WORKDIR}/git"
11
Patrick Williams12fc9392021-08-06 09:16:53 -050012DEPENDS:prepend = "nodejs-native "
Ed Tanous760881a2017-11-02 12:58:57 -070013
Ed Tanous760881a2017-11-02 12:58:57 -070014inherit allarch
15
Patrick Williams12fc9392021-08-06 09:16:53 -050016FILES:${PN} += "${datadir}/www/*"
Ed Tanous760881a2017-11-02 12:58:57 -070017
18do_compile () {
19 cd ${S}
20 rm -rf node_modules
Jeremy Kerr31ea32d2019-05-31 09:38:04 +080021 npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install
Ed Tanous760881a2017-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