blob: 43a32c35dcc51ac5d3547dc87f8f94ceec7bd0ec [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 Geissler0554b252020-08-20 02:41:36 +00009SRCREV = "0c4aceb775cbb461d10e03888f0ab90e5a619dc7"
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