PKG_NPM_NAME:=node-hid
PKG_NAME:=$(PKG_NPM_NAME)
-PKG_VERSION:=1.3.2
+PKG_VERSION:=2.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=dce3ff3380d2ad66078ba77498e49693582437ba94bb84229f146e893fa4ed9a
+PKG_HASH:=6c1f05935215feed4e8d2f4aecf31abbad8fa783d252b0bd6041ed2f2e96e9ba
PKG_BUILD_DEPENDS:=node/host
PKG_USE_MIPS16:=0
SECTION:=lang
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 +libudev $(ICONV_DEPENDS)
+ URL:=https://www.npmjs.com/package/node-hid
+ DEPENDS:=+node +node-npm +libusb-1.0 +libudev $(ICONV_DEPENDS)
endef
define Package/node-hid/description
TARGET_LDFLAGS+=$(if $(ICONV_FULL),-liconv)
define Build/Compile
- git init $(PKG_BUILD_DIR)
+ GYP_DEFINES='driver="hidraw"' \
$(MAKE_VARS) \
$(MAKE_FLAGS) \
npm_config_arch=$(NODEJS_CPU) \
define Package/node-hid/install
$(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
- $(1)/usr/lib/node/$(PKG_NPM_NAME)/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md,*.js} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID*.node \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
$(INSTALL_DIR) $(1)/usr/bin
- $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
+ $(LN) ../lib/node/$(PKG_NPM_NAME)/src/show-devices.js $(1)/usr/bin/hid-showdevices
endef
$(eval $(call BuildPackage,node-hid))