node-serialport: copy files, not symlinks
authorEneas U de Queiroz <[email protected]>
Fri, 7 Dec 2018 17:20:22 +0000 (15:20 -0200)
committerEneas U de Queiroz <[email protected]>
Fri, 7 Dec 2018 17:22:53 +0000 (15:22 -0200)
This was meant to be included in 93d6d1b, 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 <[email protected]>
lang/node-serialport/Makefile

index da1e4ff409c277b62276aa980eb1739605af3135..2c75acf0679e69959f17f5e41f480b896f6fa7ea 100644 (file)
@@ -48,12 +48,14 @@ CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
 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 --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR)
+       npm install --build-from-source --target_arch=$(CPU) -g \
+               `npm pack $(PKG_BUILD_DIR) | tail -n 1`
 endef
 
 define Package/node-serialport/install