PKG_NPM_NAME:=hid
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.7.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
-EXTRA_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
define Build/Compile
git init $(PKG_BUILD_DIR)
$(MAKE_FLAGS) \
npm_config_arch=$(CONFIG_ARCH) \
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
+ npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache-$(TMPNPM) \
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR)
endef