0fd6954fcb
This package downloads the pre-built version of nodejs, if the host platform supports it. Reuse the variables defined in nodejs.mk. For the definition of BR2_PACKAGE_PROVIDES_HOST_NODEJS, take care of defaulting to host-nodejs-bin if host-nodejs is not selected at all. This makes sure that in the future we will be able to run 'make foo-source' for a package that uses nodejs vendoring, and it will use the prebuilt nodejs to perform the vendoring. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [Arnout: - update to 16.20.0 to match nodejs.mk - including hashes; - add HOST_NODEJS_BIN_ACTUAL_SOURCE_TARBALL + hash; - move to package/nodejs/nodejs-bin; - drop DEVELOPERS change, it's already covered by package/nodejs; - re-order the series; - immediately add it as a virtual package provider; - add prompt and helpt text to choice; - select host-nodejs-bin as provider if host-nodejs is not selected at all. ] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
################################################################################
|
|
#
|
|
# nodejs-bin
|
|
#
|
|
################################################################################
|
|
|
|
NODEJS_BIN_VERSION = $(NODEJS_COMMON_VERSION)
|
|
NODEJS_BIN_SITE = $(NODEJS_COMMON_SITE)
|
|
NODEJS_BIN_SOURCE = node-v$(NODEJS_BIN_VERSION)-linux-$(NODEJS_BIN_ARCH).tar.xz
|
|
HOST_NODEJS_BIN_ACTUAL_SOURCE_TARBALL = node-v$(NODEJS_BIN_VERSION).tar.xz
|
|
NODEJS_BIN_DL_SUBDIR = nodejs
|
|
|
|
NODEJS_BIN_LICENSE = $(NODEJS_LICENSE)
|
|
NODEJS_BIN_LICENSE_FILES = $(NODEJS_LICENSE_FILES)
|
|
NODEJS_BIN_CPE_ID_VENDOR = $(NODEJS_CPE_ID_VENDOR)
|
|
NODEJS_BIN_CPE_ID_PRODUCT = $(NODEJS_CPE_ID_PRODUCT)
|
|
|
|
HOST_NODEJS_BIN_PROVIDES = host-nodejs
|
|
|
|
ifeq ($(HOSTARCH),aarch64)
|
|
NODEJS_BIN_ARCH = arm64
|
|
else ifeq ($(HOSTARCH),arm)
|
|
# We assume that if someone does a build on ARM, it will be on an
|
|
# ARMv7 machine
|
|
NODEJS_BIN_ARCH = armv7l
|
|
else ifeq ($(HOSTARCH),ppc64le)
|
|
NODEJS_BIN_ARCH = ppc64le
|
|
else ifeq ($(HOSTARCH),x86_64)
|
|
NODEJS_BIN_ARCH = x64
|
|
endif
|
|
|
|
define HOST_NODEJS_BIN_INSTALL_CMDS
|
|
rsync -a --exclude=CHANGELOG.md --exclude=LICENSE --exclude=README.md \
|
|
$(@D)/* $(HOST_DIR)/
|
|
endef
|
|
|
|
$(eval $(host-generic-package))
|