PKG_NPM_NAME:=serialport
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=6.1.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
EXTRA_LDFLAGS="$(FPIC) -L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC)
define Build/Compile
$(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