imyller / meta-nodejs

OpenEmbedded layer for latest Node.js releases
MIT License
79 stars 87 forks source link

Attempting to install custom node package, but files are not being copied into the build #88

Open RobGries opened 7 years ago

RobGries commented 7 years ago

Hello,

I'm attempting to use this meta-layer and it's class to install a custom nodejs package, but I cannot get my files to copy from my ${WORKDIR} to my build.

This is the bitbake recipe that I'm working with:

SUMMARY = "nodeJsServer"
SECTION = "meta-custom"
AUTHOR = "Company"

LICENSE = "CLOSED" 

SRC_URI = "<private_repo_URI>"
SRC_URI[md5sum] = "???"
SRC_URI[sha256sum] = "???"

S = "${WORKDIR}/git"

inherit npm-install-global

I browsed to my workdir and it appears that the sources are being populated into the git/ directory there but I'm not seeing them show up in the global package dir on my build (/usr/lib/node_modules/nodeJsServer). Instead I get a broken symlink to a non-existent directory called /git on the root of the image.

Am I missing a directive to copy the node files into my build root or something?

Thanks, Rob

RobGries commented 7 years ago

Ah, nevermind, I got it. I was able to populate the path using a do_install() directive like this:

do_install(){
    install -d ${D}${libdir}/node_modules/nodeJsServer
    cp -r ${S}/* ${D}${libdir}/node_modules/nodeJsServer
}

It works great now, you can probably close this.