Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 1 | # This recipe requires online access to build, as it uses NPM for dependency |
| 2 | # management and resolution. |
Patrick Venture | fd8d54a | 2018-10-03 13:22:12 -0700 | [diff] [blame] | 3 | PR = "r1" |
| 4 | PV = "1.0+git${SRCPV}" |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 5 | LICENSE = "Apache-2.0" |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
Patrick Venture | fd8d54a | 2018-10-03 13:22:12 -0700 | [diff] [blame] | 7 | |
| 8 | SRC_URI = "git://github.com/openbmc/phosphor-webui.git" |
Andrew Geissler | 0554b25 | 2020-08-20 02:41:36 +0000 | [diff] [blame] | 9 | SRCREV = "0c4aceb775cbb461d10e03888f0ab90e5a619dc7" |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 10 | S = "${WORKDIR}/git" |
| 11 | |
| 12 | DEPENDS_prepend = "nodejs-native " |
| 13 | |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 14 | inherit allarch |
| 15 | |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 16 | FILES_${PN} += "${datadir}/www/*" |
| 17 | |
| 18 | do_compile () { |
| 19 | cd ${S} |
| 20 | rm -rf node_modules |
Jeremy Kerr | 0a4689a | 2019-05-31 09:38:04 +0800 | [diff] [blame] | 21 | npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install |
Ed Tanous | f8ce124 | 2017-11-02 12:58:57 -0700 | [diff] [blame] | 22 | npm run-script build |
| 23 | } |
| 24 | |
| 25 | do_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 | |