diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-07-31 20:59:18 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-07-31 20:59:18 +0300 |
commit | b4f66bacb1b8e661d794fa7a189e2f66f5092e2e (patch) | |
tree | 5a8302cd349fdb68dadca003483c61917d4a6add /poky/meta/classes/npm.bbclass | |
parent | 43a183cc0926da36e3a218efa02ab4838ace316f (diff) | |
parent | dd755025e33af27b059ea7ef3afbe850e4880b08 (diff) | |
download | openbmc-b4f66bacb1b8e661d794fa7a189e2f66f5092e2e.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'poky/meta/classes/npm.bbclass')
-rw-r--r-- | poky/meta/classes/npm.bbclass | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/poky/meta/classes/npm.bbclass b/poky/meta/classes/npm.bbclass index 6dbae6bc7..4b1f0a39f 100644 --- a/poky/meta/classes/npm.bbclass +++ b/poky/meta/classes/npm.bbclass @@ -10,7 +10,7 @@ def node_pkgname(d): NPMPN ?= "${@node_pkgname(d)}" -NPM_INSTALLDIR = "${libdir}/node/${NPMPN}" +NPM_INSTALLDIR = "${libdir}/node_modules/${NPMPN}" # function maps arch names to npm arch names def npm_oe_arch_map(target_arch, d): @@ -53,9 +53,10 @@ npm_do_install() { # be created in this directory export HOME=${WORKDIR} mkdir -p ${D}${libdir}/node_modules - npm pack . - npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz - mv ${D}${libdir}/node_modules ${D}${libdir}/node + local NPM_PACKFILE=$(npm pack .) + npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPM_PACKFILE} + ln -fs node_modules ${D}${libdir}/node + find ${D}${NPM_INSTALLDIR} -type f \( -name "*.a" -o -name "*.d" -o -name "*.o" \) -delete if [ -d ${D}${prefix}/etc ] ; then # This will be empty rmdir ${D}${prefix}/etc @@ -85,6 +86,8 @@ python populate_packages_prepend () { } FILES_${PN} += " \ + ${bindir} \ + ${libdir}/node \ ${NPM_INSTALLDIR} \ " |