diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2020-01-24 22:35:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2020-02-05 16:16:05 +0300 |
commit | 584fe713b0f71951dc514edb5e236687247d18d4 (patch) | |
tree | 268dd53f68930f993e98db19a85af1923a4316d5 /meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb | |
parent | ca2bae43ba807fc22193539a73e42d9c3ab3a57b (diff) | |
download | openbmc-584fe713b0f71951dc514edb5e236687247d18d4.tar.xz |
Add webui-vue recipe
webui-vue is a vue rewrite of the phosphor-webui.
This recipe is a copy from the phosphor-webui recipe.
Left in things like the allarch, proxy (needed for corporate
proxies), and removing node_modules before building.
Existing webui recipe:
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb
Targeting June 2020 for the vue rewrite to be of feature parity with
phosphor-webui.
More information on the vue rewrite can be found on the mailing list.
Tested: Changed line 5 of
meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
to webui-vue and loaded on a Witherspoon.
(From meta-phosphor rev: 48823a881a92c9e2295c4719188b4951c8740ccb)
Change-Id: I7ad33512d8c9499cf7458c80668cb73bb13a44b5
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb')
-rw-r--r-- | meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb new file mode 100644 index 000000000..2ec49edbd --- /dev/null +++ b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb @@ -0,0 +1,47 @@ +# This recipe requires online access to build, as it uses NPM for dependency +# management and resolution. +PR = "r1" +PV = "1.0+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://github.com/openbmc/webui-vue.git" +SRCREV = "28cb682967ef35b90f295834d2ffb105e1d30e21" +S = "${WORKDIR}/git" + +DEPENDS_prepend = "nodejs-native " + +# allarch is required because the files this recipe produces (html and +# javascript) are valid for any target, regardless of architecture. The allarch +# class removes your compiler definitions, as it assumes that anything that +# requires a compiler is platform specific. Unfortunately, one of the build +# tools uses libsass for compiling the css templates, and it needs a compiler to +# build the library that it then uses to compress the scss into normal css. +# Enabling allarch, then re-adding the compiler flags was the best of the bad +# options + +inherit allarch + +export CXX = "${BUILD_CXX}" +export CC = "${BUILD_CC}" +export CFLAGS = "${BUILD_CFLAGS}" +export CPPFLAGS = "${BUILD_CPPFLAGS}" +export CXXFLAGS = "${BUILD_CXXFLAGS}" + +FILES_${PN} += "${datadir}/www/*" + +do_compile () { + cd ${S} + rm -rf node_modules + npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install + npm run build +} + +do_install () { + # create directory structure + install -d ${D}${datadir}/www + cp -r ${S}/dist/** ${D}${datadir}/www + find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' + + find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' + +} + |