|
|
@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk |
|
|
|
|
|
|
|
PKG_NPM_NAME:=homebridge |
|
|
|
PKG_NAME:=node-$(PKG_NPM_NAME) |
|
|
|
PKG_VERSION:=1.1.1 |
|
|
|
PKG_VERSION:=1.1.2 |
|
|
|
PKG_RELEASE:=1 |
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz |
|
|
|
PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ |
|
|
|
PKG_HASH:=ccbd9e2e199a56f3b5749bb58dfad2fd629c3bc5fc55c36cc3f870061108b883 |
|
|
|
PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ |
|
|
|
PKG_HASH:=2cf7bf7334067fc1278644ff4981913517582817e6378583f2d54bcbd97a44f1 |
|
|
|
|
|
|
|
PKG_BUILD_DEPENDS:=node/host |
|
|
|
PKG_USE_MIPS16:=0 |
|
|
@ -34,16 +34,17 @@ endef |
|
|
|
|
|
|
|
define Package/node-homebridge/description |
|
|
|
Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API |
|
|
|
*** You need to install avahi-nodbus-daemon or avahi-dbus-daemon or umdns or mdnsd package. *** |
|
|
|
endef |
|
|
|
|
|
|
|
TAR_OPTIONS+= --strip-components 1 |
|
|
|
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) |
|
|
|
|
|
|
|
NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) |
|
|
|
TMPNPM:=$(shell mktemp -u XXXXXXXXXX) |
|
|
|
|
|
|
|
TARGET_CFLAGS+=$(FPIC) |
|
|
|
|
|
|
|
define Build/Prepare |
|
|
|
$(INSTALL_DIR) $(PKG_BUILD_DIR) |
|
|
|
endef |
|
|
|
TARGET_CPPFLAGS+=$(FPIC) |
|
|
|
|
|
|
|
define Build/Compile |
|
|
|
$(MAKE_VARS) \
|
|
|
@ -55,14 +56,19 @@ define Build/Compile |
|
|
|
npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
|
|
|
|
npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
|
|
|
|
npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
|
|
|
|
npm install -g $(DL_DIR)/$(PKG_SOURCE) |
|
|
|
npm install -g $(PKG_BUILD_DIR) |
|
|
|
rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM) |
|
|
|
rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) |
|
|
|
endef |
|
|
|
|
|
|
|
define Package/node-homebridge/install |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/node |
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/ |
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) |
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{*.json,*.md} \
|
|
|
|
$(1)/usr/lib/node/$(PKG_NPM_NAME)/ |
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
|
|
|
|
$(1)/usr/lib/node/$(PKG_NPM_NAME)/ |
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{LICENSE,bin} \
|
|
|
|
$(1)/usr/lib/node/$(PKG_NPM_NAME)/ |
|
|
|
$(INSTALL_DIR) $(1)/usr/bin |
|
|
|
$(LN) ../lib/node/homebridge/bin/homebridge $(1)/usr/bin/homebridge |
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d |
|
|
|