diff options
author | Patrick Venture <venture@google.com> | 2018-10-03 13:22:12 -0700 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-08 22:51:18 -0400 |
commit | e28f387b99b0ee4881b2443891ea21fea5b3d961 (patch) | |
tree | 80a07337a998160fab4ff85e0baebb4dfe6c89a8 /meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb | |
parent | c5bbd4102e4a050990518109c48efe843a7b7b2c (diff) | |
download | talos-openbmc-e28f387b99b0ee4881b2443891ea21fea5b3d961.tar.gz talos-openbmc-e28f387b99b0ee4881b2443891ea21fea5b3d961.zip |
meta-phosphor: webui: rename as git
Rename phosphor-webui.bb to phosphor-webui_git.bb per OE norms.
(From meta-phosphor rev: fd8d54a24ac1cbe8d890e831735dc0a2f72fafa7)
Change-Id: I32684d859ccda690697a475e134606db72ec70cc
Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb')
-rw-r--r-- | meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb b/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb new file mode 100644 index 000000000..46d5e344d --- /dev/null +++ b/meta-phosphor/recipes-phosphor/webui/phosphor-webui_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/phosphor-webui.git" +SRCREV = "971ac1aaf4a7096bb20ec75db3be5755f8899906" +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-script 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 '{}' + +} + |