Advertisement
Guest User

Untitled

a guest
Sep 19th, 2015
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.92 KB | None | 0 0
  1. #
  2. # Copyright (C) 2007-2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7.  
  8. include $(TOPDIR)/rules.mk
  9.  
  10. PKG_NAME:=nodejs
  11. PKG_VERSION:=0.12.7
  12. PKG_RELEASE:=0
  13.  
  14. PKG_SOURCE:=node-v$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://nodejs.org/dist/v$(PKG_VERSION)/
  16. PKG_MD5SUM:=5523ec4347d7fe6b0f6dda1d1c7799d5
  17.  
  18. PKG_BUILD_DEPENDS:=nodejs/host
  19.  
  20. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/node-v$(PKG_VERSION)
  21. PKG_BUILD_DIR:=$(BUILD_DIR)/node-v$(PKG_VERSION)
  22. PKG_INSTALL:=1
  23.  
  24. include $(INCLUDE_DIR)/host-build.mk
  25. include $(INCLUDE_DIR)/package.mk
  26.  
  27. define Package/nodejs
  28.   SUBMENU:=Node.js
  29.   SECTION:=net
  30.   CATEGORY:=Network
  31.   TITLE:=Node.js Evented I/O for V8 JavaScript
  32.   URL:=http://nodejs.org
  33.   MAINTAINER:=Xin Ouyang <xinpascal@gmail.com>
  34.   DEPENDS:=@armeb||@arm||@i386 +libstdcpp +libpthread +librt +libopenssl
  35. endef
  36.  
  37. define Package/nodejs/description
  38.  Node.js is a platform built on Chrome's JavaScript runtime for easily
  39. building fast, scalable network applications. Node.js uses an event-driven,
  40. non-blocking I/O model that makes it lightweight and efficient, perfect
  41. for data-intensive real-time applications that run across distributed
  42. devices.
  43. endef
  44.  
  45. define Package/nodejs-npm
  46.  SUBMENU:=Node.js
  47.  SECTION:=net
  48.  CATEGORY:=Network
  49.  TITLE:=Node Package Manager
  50.  URL:=https://npmjs.org
  51.  MAINTAINER:=Xin Ouyang <xinpascal@gmail.com>
  52.  DEPENDS:=@armeb||@arm||@i386 +libstdcpp +libpthread +librt +libopenssl
  53. endef
  54.  
  55. define Package/nodejs-npm/description
  56.  npm is the package manager for the Node JavaScript platform. It puts
  57.  modules in place so that node can find them, and manages dependency
  58.  conflicts intelligently.
  59. endef
  60.  
  61. HOST_CONFIGURE_CMD =""
  62. CONFIGURE_ARGS=""
  63. HOST_CONFIGURE_ARGS=""
  64.  
  65.  
  66. # HOST_CONFIGURE_ARGS = \
  67. #   --prefix=$(STAGING_DIR_HOST) \
  68. #   --without-snapshot \
  69. #   --dest-cpu=ia32
  70.  
  71.  
  72. define Build/Configure/
  73. $(cd $(PKG_BUILD_DIR); ./configure --prefix=$(STAGING_DIR_HOST) --without-snapshot --dest-cpu=ia32 )
  74. $(call Build/Configure/Default)
  75. endef
  76.  
  77. # define Build/Compile
  78. # $(MAKE) -C $(PKG_BUILD_DIR) \
  79. # CXX="$(TARGET_CROSS)g++" \
  80. # AR="$(TARGET_CROSS)ar" \
  81. # RANLIB="$(TARGET_CROSS)ranlib" \
  82. # LINK="$(TARGET_CROSS)g++" \
  83. # LD="$(TARGET_CROSS)g++"
  84. # endef
  85.  
  86.  
  87. # define Package/nodejs/install
  88. #   $(INSTALL_DIR) $(1)/usr/bin
  89. #   $(CP) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/node
  90. # endef
  91. #
  92. # define Package/nodejs-npm/install
  93. #   $(INSTALL_DIR) $(1)/usr/bin
  94. #   $(CP) $(PKG_INSTALL_DIR)/usr/bin/npm $(1)/usr/bin/npm
  95. #   $(INSTALL_DIR) $(1)/usr/lib/node_modules
  96. #   $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/ \
  97. #       $(1)/usr/lib/node_modules
  98. # endef
  99. #
  100. # define Build/InstallDev
  101. #   $(INSTALL_DIR) $(1)/usr/share/nodejs-src
  102. #   $(CP) $(PKG_BUILD_DIR)/* $(1)/usr/share/nodejs-src
  103. # endef
  104.  
  105. $(eval $(call HostBuild))
  106. $(eval $(call BuildPackage,nodejs))
  107. $(eval $(call BuildPackage,nodejs-npm))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement