2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=node-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://nodejs.org
/dist/${PKG_VERSION}
17 HOST_BUILD_DEPENDS
:=python
/host
18 PKG_BUILD_DEPENDS
:=python
/host
22 PKG_MAINTAINER
:=John Crispin
<blogic@openwrt.org
>
25 include $(INCLUDE_DIR
)/host-build.mk
26 include $(INCLUDE_DIR
)/package.mk
32 TITLE
:=Node.js is a platform built on Chrome
's JavaScript runtime
33 URL:=http://nodejs.org/
34 DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +libuv
37 define Package/node/description
38 Node.jsĀ® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses
39 an event-driven
, non-blocking I
/O model that makes it lightweight and efficient. Node.js
'
40 package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
43 CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
57 HOST_CONFIGURE_ARGS:= \
60 --prefix=$(STAGING_DIR)/host/
62 HOST_CONFIGURE_CMD:=python ./configure
64 define Build/InstallDev
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
69 define Package/node/install
70 mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
71 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
78 $(eval $(call HostBuild))
79 $(eval $(call BuildPackage,node))