Makefile (1246B)
1 include $(TOPDIR)/rules.mk 2 3 PKG_NAME:=nodejs 4 PKG_VERSION:=6.x 5 PKG_RELEASE:=1 6 7 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 8 9 include $(INCLUDE_DIR)/package.mk 10 11 define Package/nodejs 12 SECTION:=utils 13 CATEGORY:=Utilities 14 TITLE:=nodejs 15 URL:=https://github.com/MTRNord/mtrnord_gluon_packages/tree/master/nodejs 16 endef 17 18 define Package/nodejs/description 19 NodejsMinimal Version 20 endef 21 22 define Build/Prepare 23 export AR="$(TOOLCHAIN_DIR)/bin/ar" 24 export CC="$(TOOLCHAIN_DIR)/bin/gcc" 25 export CXX="$(TOOLCHAIN_DIR)/bin/g++" 26 export LINK="$(TOOLCHAIN_DIR)/bin/g++" 27 export RANLIB="$(TOOLCHAIN_DIR)/bin/ranlib" 28 export STAGING_DIR="$(STAGING_DIR)" 29 export LIBPATH="TOOLCHAIN_LIB_DIRS" 30 export LDFLAGS="'-Wl,-rpath-link '${LIBPATH}" 31 git clone https://github.com/nodejs/node.git 32 cd node 33 git checkout v6.x 34 cd $(TOPDIR) 35 endef 36 37 define Build/Configure 38 cd node 39 ./configure '--without-snapshot --without-npm' 40 cd $(TOPDIR) 41 endef 42 43 define Build/Compile 44 cd node 45 CFLAGS="$(TARGET_CFLAGS)" CPPFLAGS="$(TARGET_CPPFLAGS)" make -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) 46 cd $(TOPDIR) 47 endef 48 49 define Package/nodejs/install 50 $(INSTALL_DIR) $(1)/usr/bin 51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/node $(1)/usr/bin/node 52 endef 53 54 $(eval $(call BuildPackage,nodejs))