node-hid: copy files, not symlinks
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Fri, 7 Dec 2018 17:18:56 +0000 (15:18 -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 1e0720e, 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-hid/Makefile

index e833f1c687b12e6325f638d4e3704268edfe5bb0..ec5b19fe703ac60c5656542bbed1e9bf9ac04f09 100644 (file)
@@ -34,7 +34,7 @@ define Package/node-hid
   CATEGORY:=Languages
   TITLE:=Node.js package to access HID devices
   URL:=https://github.com/node-hid/node-hid
-  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp
+  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
 endef
 
 define Package/node-hid/description
@@ -47,13 +47,15 @@ EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
 
 define Build/Compile
        git init $(PKG_BUILD_DIR)
+       cd $(PKG_BUILD_DIR) ; \
        $(MAKE_VARS) \
        $(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-hid/install