Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 1 | LICENSE = "Apache-2.0" |
| 2 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 3 | DEPENDS:prepend = "nodejs-native " |
| 4 | SRCREV = "e16bb5c35893591eab048ae4ef646a9e5e2f7e94" |
| 5 | PV = "1.0+git${SRCPV}" |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 6 | # This recipe requires online access to build, as it uses NPM for dependency |
| 7 | # management and resolution. |
Patrick Venture | e28f387 | 2018-10-03 13:22:12 -0700 | [diff] [blame] | 8 | PR = "r1" |
Patrick Venture | e28f387 | 2018-10-03 13:22:12 -0700 | [diff] [blame] | 9 | |
Patrick Williams | bb99d22 | 2022-01-24 15:55:09 -0600 | [diff] [blame] | 10 | SRC_URI = "git://github.com/openbmc/phosphor-webui.git;branch=master;protocol=https" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 11 | |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 12 | S = "${WORKDIR}/git" |
| 13 | |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 14 | inherit allarch |
| 15 | |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 16 | do_compile () { |
Ed Tanous | 065ecd6 | 2022-06-09 11:33:48 -0700 | [diff] [blame] | 17 | bbwarn "phosphor-webui is deprecated and has been replaced with webui-vue" |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 18 | cd ${S} |
| 19 | rm -rf node_modules |
Jeremy Kerr | 31ea32d | 2019-05-31 09:38:04 +0800 | [diff] [blame] | 20 | npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 21 | npm run-script build |
| 22 | } |
Ed Tanous | 760881a | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 23 | do_install () { |
| 24 | # create directory structure |
| 25 | install -d ${D}${datadir}/www |
| 26 | cp -r ${S}/dist/** ${D}${datadir}/www |
| 27 | find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' + |
| 28 | find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' + |
| 29 | } |
| 30 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 31 | FILES:${PN} += "${datadir}/www/*" |