Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 1 | # allarch is required because the files this recipe produces (html and |
| 2 | # javascript) are valid for any target, regardless of architecture. The allarch |
| 3 | # class removes your compiler definitions, as it assumes that anything that |
| 4 | # requires a compiler is platform specific. Unfortunately, one of the build |
| 5 | # tools uses libsass for compiling the css templates, and it needs a compiler to |
| 6 | # build the library that it then uses to compress the scss into normal css. |
| 7 | # Enabling allarch, then re-adding the compiler flags was the best of the bad |
| 8 | # options |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 9 | LICENSE = "Apache-2.0" |
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 11 | DEPENDS:prepend = "nodejs-native " |
Andrew Geissler | e42f678 | 2023-03-28 03:30:32 -0500 | [diff] [blame^] | 12 | SRCREV = "095bb6ddae8f651390097fb7bbded0089ac0fa05" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 13 | PV = "1.0+git${SRCPV}" |
| 14 | # This recipe requires online access to build, as it uses NPM for dependency |
| 15 | # management and resolution. |
| 16 | PR = "r1" |
| 17 | |
| 18 | SRC_URI = "git://github.com/openbmc/webui-vue.git;branch=master;protocol=https" |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 21 | |
| 22 | inherit allarch |
| 23 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 24 | EXTRA_OENPM ?= "" |
| 25 | |
Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 26 | export CXX = "${BUILD_CXX}" |
| 27 | export CC = "${BUILD_CC}" |
| 28 | export CFLAGS = "${BUILD_CFLAGS}" |
| 29 | export CPPFLAGS = "${BUILD_CPPFLAGS}" |
| 30 | export CXXFLAGS = "${BUILD_CXXFLAGS}" |
| 31 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 32 | # Workaround |
Jorge Cisneros | 14cef4e | 2022-02-15 21:01:20 +0000 | [diff] [blame] | 33 | # Network access from task are disabled by default on Yocto 3.5 |
| 34 | # https://git.yoctoproject.org/poky/tree/documentation/migration-guides/migration-3.5.rst#n25 |
| 35 | do_compile[network] = "1" |
Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 36 | do_compile () { |
| 37 | cd ${S} |
| 38 | rm -rf node_modules |
| 39 | npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install |
Abhishek Patel | 0b4f549 | 2021-07-19 08:24:26 -0500 | [diff] [blame] | 40 | npm run build ${EXTRA_OENPM} |
Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 41 | } |
Gunnar Mills | 584fe71 | 2020-01-24 13:35:33 -0600 | [diff] [blame] | 42 | do_install () { |
| 43 | # create directory structure |
| 44 | install -d ${D}${datadir}/www |
| 45 | cp -r ${S}/dist/** ${D}${datadir}/www |
| 46 | find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' + |
| 47 | find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' + |
| 48 | } |
| 49 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 50 | FILES:${PN} += "${datadir}/www/*" |