logrotate: enable selinux support
[buildroot-gz.git] / package / mongodb / mongodb.mk
blobf5b2c01db370ac7db8060471fc8bf1d75a3f8a87
1 ################################################################################
3 # mongodb
5 ################################################################################
7 MONGODB_VERSION_BASE = 3.3.4
8 MONGODB_VERSION = r$(MONGODB_VERSION_BASE)
9 MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION))
11 MONGODB_LICENSE = AGPLv3, Apache-2.0
12 MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
14 MONGODB_DEPENDENCIES = host-scons
16 MONGODB_SCONS_TARGETS = mongod mongos
18 MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
19 -j"$(PARALLEL_JOBS)"
21 MONGODB_SCONS_OPTS = --disable-warnings-as-errors
23 # need to pass mongo version when not building from git repo
24 MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION_BASE)-
26 # WiredTiger database storage engine only supported on 64 bits
27 ifeq ($(BR2_ARCH_IS_64),y)
28 MONGODB_SCONS_OPTS += --wiredtiger=on
29 else
30 MONGODB_SCONS_OPTS += --wiredtiger=off
31 endif
33 # JavaScript scripting engine and tcmalloc supported only on
34 # x86/x86-64 systems. Mongo target is a shell interface that
35 # depends on the javascript engine, so it will also only be
36 # built on x86/x86-64 systems.
37 ifeq ($(BR2_i386)$(BR2_x86_64),y)
38 MONGODB_SCONS_OPTS += --js-engine=mozjs --allocator=tcmalloc
39 MONGODB_SCONS_TARGETS += mongo
40 else
41 MONGODB_SCONS_OPTS += --js-engine=none --allocator=system
42 endif
44 ifeq ($(BR2_PACKAGE_OPENSSL),y)
45 MONGODB_DEPENDENCIES += openssl
46 MONGODB_SCONS_OPTS += --ssl=SSL
47 endif
49 define MONGODB_BUILD_CMDS
50 (cd $(@D); \
51 $(SCONS) \
52 $(MONGODB_SCONS_ENV) \
53 $(MONGODB_SCONS_OPTS) \
54 $(MONGODB_SCONS_TARGETS))
55 endef
57 define MONGODB_INSTALL_TARGET_CMDS
58 (cd $(@D); \
59 $(SCONS) \
60 $(MONGODB_SCONS_ENV) \
61 $(MONGODB_SCONS_OPTS) \
62 --prefix=$(TARGET_DIR)/usr \
63 install)
64 endef
66 $(eval $(generic-package))