@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NPM_NAME := node-hid
PKG_NPM_NAME := node-hid
PKG_NAME := $( PKG_NPM_NAME)
PKG_NAME := $( PKG_NPM_NAME)
PKG_VERSION := 2.1.1
PKG_VERSION := 2.1.1
PKG_RELEASE := 1
PKG_RELEASE := 2
PKG_SOURCE := $( PKG_NPM_NAME) -$( PKG_VERSION) .tgz
PKG_SOURCE := $( PKG_NPM_NAME) -$( PKG_VERSION) .tgz
PKG_SOURCE_URL := https://registry.npmjs.org/$( PKG_NPM_NAME) /-/
PKG_SOURCE_URL := https://registry.npmjs.org/$( PKG_NPM_NAME) /-/
@ -48,9 +48,7 @@ TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
TARGET_CFLAGS += $( FPIC) -I$( STAGING_DIR) /usr/include/libusb-1.0
TARGET_CFLAGS += $( FPIC) -I$( STAGING_DIR) /usr/include/libusb-1.0
TARGET_LDFLAGS += $( if $( ICONV_FULL) ,-liconv)
TARGET_LDFLAGS += $( if $( ICONV_FULL) ,-liconv)
d e f i n e B u i l d / C o m p i l e
GYP_DEFINES = 'driver="hidraw"' \
$( MAKE_VARS) \
NPM_FLAGS = $( MAKE_VARS) \
$( MAKE_FLAGS) \
$( MAKE_FLAGS) \
npm_config_arch = $( NODEJS_CPU) \
npm_config_arch = $( NODEJS_CPU) \
npm_config_target_arch = $( NODEJS_CPU) \
npm_config_target_arch = $( NODEJS_CPU) \
@ -58,8 +56,12 @@ define Build/Compile
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_prefix = $( PKG_INSTALL_DIR) /usr/ \
npm_config_prefix = $( PKG_INSTALL_DIR) /usr/ \
npm_config_cache = $( TMP_DIR) /npm-cache-$( TMPNPM) \
npm_config_cache = $( TMP_DIR) /npm-cache-$( TMPNPM) \
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( TMPNPM) \
npm install -g $( PKG_BUILD_DIR)
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( TMPNPM)
d e f i n e B u i l d / C o m p i l e
$( NPM_FLAGS) npm i -g --production $( PKG_BUILD_DIR) --ignore-scripts
GYP_DEFINES = 'driver="hidraw"' \
$( NPM_FLAGS) npm i --production --prefix= $( PKG_BUILD_DIR) --target_arch= $( NODEJS_CPU) --prefer-dedupe
rm -rf $( TMP_DIR) /npm-tmp-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-tmp-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( TMPNPM)
e n d e f
e n d e f