1################################################################################ 2# 3# mongodb 4# 5################################################################################ 6 7MONGODB_VERSION = 4.2.11 8MONGODB_SITE = https://fastdl.mongodb.org/src 9MONGODB_SOURCE = mongodb-src-r$(MONGODB_VERSION).tar.gz 10 11MONGODB_LICENSE = Apache-2.0 (drivers), SSPL (database) 12MONGODB_LICENSE_FILES = APACHE-2.0.txt LICENSE-Community.txt 13 14MONGODB_CPE_ID_VENDOR = mongodb 15MONGODB_SELINUX_MODULES = mongodb 16 17MONGODB_DEPENDENCIES = \ 18 boost \ 19 host-python3-cheetah \ 20 host-python3-psutil \ 21 host-python3-pyyaml \ 22 host-python3-regex \ 23 host-python-requests \ 24 host-scons \ 25 pcre \ 26 snappy \ 27 sqlite \ 28 yaml-cpp \ 29 zlib 30 31MONGODB_SCONS_TARGETS = mongod mongos 32 33MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ 34 -j"$(PARALLEL_JOBS)" 35 36MONGODB_SCONS_OPTS = \ 37 --disable-minimum-compiler-version-enforcement \ 38 --disable-warnings-as-errors \ 39 --use-system-boost \ 40 --use-system-pcre \ 41 --use-system-snappy \ 42 --use-system-sqlite \ 43 --use-system-yaml \ 44 --use-system-zlib 45 46# need to pass mongo version when not building from git repo 47MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION)- 48 49# WiredTiger database storage engine only supported on 64 bits 50ifeq ($(BR2_ARCH_IS_64),y) 51MONGODB_SCONS_OPTS += --wiredtiger=on 52else 53MONGODB_SCONS_OPTS += --wiredtiger=off 54endif 55 56# JavaScript scripting engine and tcmalloc supported only on 57# x86/x86-64 systems. Mongo target is a shell interface that 58# depends on the javascript engine, so it will also only be 59# built on x86/x86-64 systems. 60ifeq ($(BR2_i386)$(BR2_x86_64),y) 61MONGODB_SCONS_OPTS += --js-engine=mozjs --allocator=tcmalloc 62MONGODB_SCONS_TARGETS += mongo 63else 64MONGODB_SCONS_OPTS += --js-engine=none --allocator=system 65endif 66 67ifeq ($(BR2_PACKAGE_LIBCURL),y) 68MONGODB_DEPENDENCIES += libcurl 69MONGODB_SCONS_OPTS += \ 70 --enable-free-mon=on \ 71 --enable-http-client=on 72else 73MONGODB_SCONS_OPTS += \ 74 --enable-free-mon=off \ 75 --enable-http-client=off 76endif 77 78ifeq ($(BR2_PACKAGE_OPENSSL),y) 79MONGODB_DEPENDENCIES += openssl 80MONGODB_SCONS_OPTS += \ 81 --ssl=on \ 82 --ssl-provider=openssl 83else 84MONGODB_SCONS_OPTS += --ssl=off 85endif 86 87define MONGODB_BUILD_CMDS 88 (cd $(@D); \ 89 $(HOST_DIR)/bin/python3 $(SCONS) \ 90 $(MONGODB_SCONS_ENV) \ 91 $(MONGODB_SCONS_OPTS) \ 92 $(MONGODB_SCONS_TARGETS)) 93endef 94 95define MONGODB_INSTALL_TARGET_CMDS 96 (cd $(@D); \ 97 $(HOST_DIR)/bin/python3 $(SCONS) \ 98 $(MONGODB_SCONS_ENV) \ 99 $(MONGODB_SCONS_OPTS) \ 100 --prefix=$(TARGET_DIR)/usr \ 101 install) 102endef 103 104$(eval $(generic-package)) 105