2 # Copyright (C) 2006-2011 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.
44 --dest-cpu=$(CONFIG_ARCH) \
52 HOST_CONFIGURE_ARGS:= \
55 --prefix=$(STAGING_DIR_HOST)/
57 HOST_CONFIGURE_CMD:=python ./configure
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/include
61 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
64 define Package/node/install
65 mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
66 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
73 $(eval $(call HostBuild))
74 $(eval $(call BuildPackage,node))