Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node-{arduino-firmata,cylon,hid,serialport}: allow compilation with CONFIG_AUTOREMOVE #7652

Closed
11 changes: 6 additions & 5 deletions lang/node-arduino-firmata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NPM_NAME:=arduino-firmata
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.3.4
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
Expand Down Expand Up @@ -52,10 +52,11 @@ define Build/Compile
cd $(PKG_BUILD_DIR) ; \
$(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 -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
npm_config_nodedir=$(STAGING_DIR)/usr \
npm_config_cache=$(TMP_DIR)/npm-cache \
npm install -g \
--prefix="$(PKG_INSTALL_DIR)/usr/" \
`npm pack $(PKG_BUILD_DIR) | tail -n 1`
endef

define Package/node-arduino-firmata/install
Expand Down
11 changes: 6 additions & 5 deletions lang/node-cylon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NPM_NAME:=cylon
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.24.0
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
Expand Down Expand Up @@ -68,10 +68,11 @@ define Build/Compile
cd $(PKG_BUILD_DIR) ; \
$(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 -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
npm_config_nodedir=$(STAGING_DIR)/usr \
npm_config_cache=$(TMP_DIR)/npm-cache \
npm install -g \
--prefix="$(PKG_INSTALL_DIR)/usr/" \
`npm pack $(PKG_BUILD_DIR) | tail -n 1`
endef

define Package/node-cylon/install
Expand Down
8 changes: 4 additions & 4 deletions lang/node-hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
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
Expand Down Expand Up @@ -51,10 +51,10 @@ define Build/Compile
$(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_config_nodedir=$(STAGING_DIR)/usr \
npm_config_cache=$(TMP_DIR)/npm-cache \
npm install --build-from-source --target_arch=$(CPU) -g \
--prefix="$(PKG_INSTALL_DIR)/usr/" \
`npm pack $(PKG_BUILD_DIR) | tail -n 1`
endef

Expand Down
18 changes: 9 additions & 9 deletions lang/node-serialport/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
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)/-/
Expand Down Expand Up @@ -51,21 +51,21 @@ define Build/Compile
cd $(PKG_BUILD_DIR) ; \
$(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_config_nodedir=$(STAGING_DIR)/usr \
npm_config_cache=$(TMP_DIR)/npm-cache \
npm install --build-from-source --target_arch=$(CPU) -g \
--prefix="$(PKG_INSTALL_DIR)/usr/" \
`npm pack $(PKG_BUILD_DIR) | tail -n 1`
endef

define Package/node-serialport/install
mkdir -p $(1)/usr/lib/node/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
$(RM) -rf $(1)/usr/lib/node/node-hid/patches \
$(1)/usr/lib/node/node-hid/.p* \
$(1)/usr/lib/node/node-hid/.quilt* \
$(1)/usr/lib/node/node-hid/.built* \
$(1)/usr/lib/node/node-hid/.config*
$(RM) -rf $(1)/usr/lib/node/node-serialport/patches \
$(1)/usr/lib/node/node-serialport/.p* \
$(1)/usr/lib/node/node-serialport/.quilt* \
$(1)/usr/lib/node/node-serialport/.built* \
$(1)/usr/lib/node/node-serialport/.config*
# Strip PKG_BUILD_DIR from useless metadata inserted by npm install
# https://github.com/npm/npm/issues/10393
# https://github.com/npm/npm/issues/12110
Expand Down