DEPENDS_prepend = "nodejs-native "
S = "${WORKDIR}/npmpkg"
+NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+
npm_do_compile() {
# changing the home directory to the working directory, the .npmrc will
# be created in this directory
}
npm_do_install() {
- mkdir -p ${D}${libdir}/node_modules/${PN}/
- cp -a ${S}/* ${D}${libdir}/node_modules/${PN}/ --no-preserve=ownership
+ mkdir -p ${NPM_INSTALLDIR}/
+ cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
}
python populate_packages_prepend () {
f.write(' rm -f ${D}/singletask.lock\n')
f.write('}\n')
+ if bb.data.inherits_class('npm', rd):
+ f.write('do_install_append() {\n')
+ f.write(' # Remove files added to source dir by devtool/externalsrc\n')
+ f.write(' rm -f ${NPM_INSTALLDIR}/singletask.lock\n')
+ f.write(' rm -rf ${NPM_INSTALLDIR}/.git\n')
+ f.write(' rm -rf ${NPM_INSTALLDIR}/oe-local-files\n')
+ f.write(' for symlink in ${EXTERNALSRC_SYMLINKS} ; do\n')
+ f.write(' rm -f ${NPM_INSTALLDIR}/${symlink%%:*}\n')
+ f.write(' done\n')
+ f.write('}\n')
+
_add_md5(config, recipename, appendfile)
logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)