node-arduino-firmata: copy files, not symlinks
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Fri, 7 Dec 2018 17:09:27 +0000 (15:09 -0200)
committerEneas U de Queiroz <cote2004-github@yahoo.com>
Fri, 7 Dec 2018 17:22:53 +0000 (15:22 -0200)
This was meant to be included in 6ed62c6, but wasn't.
Current version of npm install installs a link to the build directory.
The workaround is to use npm pack to make a tarball and install from
that.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
lang/node-arduino-firmata/Makefile

index 694183d66e5bfb5d39b10d463098fc043fa2c37a..84629ac8d41a5d35d4b36539537b4dd200d22e68 100644 (file)
@@ -49,12 +49,13 @@ endef
 EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
 
 define Build/Compile
+       cd $(PKG_BUILD_DIR) ; \
        $(MAKE_FLAGS) \
        npm_config_arch=$(CONFIG_ARCH) \
        npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
        npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
        PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install -g $(PKG_BUILD_DIR)
+       npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
 endef
 
 define Package/node-arduino-firmata/install