summaryrefslogtreecommitdiff
path: root/node-red/Makefile
blob: f979e095d9ad1eac588033bc7bcb73560460afa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
## Copyright (C) 2016-2017 CZ.NIC z.s.p.o. (http://www.nic.cz/)
#
## This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# #
#
include $(TOPDIR)/rules.mk

PKG_NAME:=node-red
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/node-red/node-red.git
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
PKG_BUILD_DEPENDS:=node/host

include $(TOPDIR)/package/autopkg-tag.mk
include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
	TITLE:=A visual tool for wiring the Internet of Things
	DEPENDS:=+node
endef

EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \

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 \
	PREFIX="$(PKG_INSTALL_DIR)/usr/" \
	$(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
endef

define Package/$(PKG_NAME)/install
	$(CP) $(PKG_INSTALL_DIR)/usr $(1)/usr
endef

$(eval $(call BuildPackage,$(PKG_NAME)))